我在自己的nodejs上添加了AWS S3,这是我第一次使用它。 当我运行我的应用程序时,出现了错误
2018-10-03T11:56:13.843291+00:00 app[web.1]: sh: 1: nodemon: not found
2018-10-03T11:56:13.827644+00:00 app[web.1]: > nodemon server.js
2018-10-03T11:56:13.854413+00:00 app[web.1]: npm ERR! file sh
2018-10-03T11:56:13.854859+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2018-10-03T11:56:13.855269+00:00 app[web.1]: npm ERR! errno ENOENT
2018-10-03T11:56:13.855634+00:00 app[web.1]: npm ERR! syscall spawn
2018-10-03T11:56:13.858988+00:00 app[web.1]: npm ERR! novel-ist-api@1.0.0 start: `nodemon server.js`
2018-10-03T11:56:13.859985+00:00 app[web.1]: npm ERR!
2018-10-03T11:56:13.860414+00:00 app[web.1]: npm ERR! Failed at the novel-ist-api@1.0.0 start script.
2018-10-03T11:56:13.859363+00:00 app[web.1]: npm ERR! spawn ENOENT
2018-10-03T11:56:13.901352+00:00 app[web.1]:
2018-10-03T11:56:13.860881+00:00 app[web.1]: npm ERR! This is probably not a problem
with npm. There is likely additional logging output above.
2018-10-03T11:56:13.902089+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2018-10-03T11_56_13_866Z-debug.log
2018-10-03T11:56:13.901742+00:00 app[web.1]: npm ERR! A complete log of this run can
be found in:
2018-10-03T11:56:30.126455+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=morning-hamlet-21755.herokuapp.com request_id=2db274ec-3b56-4a75-ad11-0fecf2e93821 fwd="180.243.188.17" dyno= connect= service= status=503 bytes= protocol=https
2018-10-03T11:56:31.865897+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=morning-hamlet-21755.herokuapp.com request_id=d54be99d-3257-49c7-ae9a-d3a8ced50d74 fwd="180.243.188.17" dyno= connect= service= status=503 bytes= protocol=https
然后我尝试运行heroku run node console
,它给了我这个
module.js:550
throw err;
^
Error: Cannot find module '/app/console'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
我不知道该如何解决