节点的Heroku应用程序错误

时间:2018-07-25 20:07:58

标签: node.js heroku npm mean

我正在尝试启动与我的github项目https://github.com/everest-software/Everest-链接的Heroku应用。当我通过Heroku部署它时,它返回并出现应用程序错误。这是我的package.json:

{
"name": "everest-app",
"version": "0.2.0",
"description": "A sample Node.js app using Express 4",
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"dependencies": {
"express": "^4.13.3"
},
"engines": {
"node": "4.0.0"
},
  "repository": {
  "type": "git",
  "url": "git+https://github.com/everest-software/Everest-.git"
},
"keywords": [
"node",
"heroku",
"express"
],
"author": "Cody Rutscher",
"contributors": [
 "Cody Rutscher <team@everest.software> (http://everest.software)"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/everest-software/Everest-/issues"
},
"homepage": "https://github.com/everest-software/Everest-#readme"
}

这是我的错误日志:

2018-07-25T19:58:56.941877+00:00 heroku[web.1]: Starting process with command 
`npm start`
 2018-07-25T19:59:01.593293+00:00 app[web.1]: 
 2018-07-25T19:59:01.593316+00:00 app[web.1]: > node-js-sample@0.2.0 start 
 /app
 2018-07-25T19:59:01.593318+00:00 app[web.1]: > node index.js
 2018-07-25T19:59:01.593320+00:00 app[web.1]: 
 2018-07-25T19:59:02.050751+00:00 app[web.1]: module.js:338
 2018-07-25T19:59:02.050779+00:00 app[web.1]: throw err;
 2018-07-25T19:59:02.050782+00:00 app[web.1]: ^
 2018-07-25T19:59:02.050784+00:00 app[web.1]: 
 2018-07-25T19:59:02.050787+00:00 app[web.1]: Error: Cannot find module 
 '/app/index.js'
 2018-07-25T19:59:02.050790+00:00 app[web.1]: at 
 Function.Module._resolveFilename (module.js:336:15)
 2018-07-25T19:59:02.050792+00:00 app[web.1]: at Function.Module._load 
 (module.js:286:25)
 2018-07-25T19:59:02.050794+00:00 app[web.1]: at Function.Module.runMain 
 (module.js:475:10)
 2018-07-25T19:59:02.050837+00:00 app[web.1]: at startup (node.js:117:18)
 2018-07-25T19:59:02.050840+00:00 app[web.1]: at node.js:951:3
 2018-07-25T19:59:02.063846+00:00 app[web.1]: 
 2018-07-25T19:59:02.083844+00:00 app[web.1]: npm ERR! Linux 4.4.0-1019-aws
 2018-07-25T19:59:02.083849+00:00 app[web.1]: npm ERR! argv 
 "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
 2018-07-25T19:59:02.083851+00:00 app[web.1]: npm ERR! node v4.0.0
 2018-07-25T19:59:02.090403+00:00 app[web.1]: npm ERR! npm  v2.14.2
 2018-07-25T19:59:02.093982+00:00 app[web.1]: npm ERR! code ELIFECYCLE
 2018-07-25T19:59:02.093988+00:00 app[web.1]: npm ERR! node-js-sample@0.2.0 
 start: `node index.js`
 2018-07-25T19:59:02.093990+00:00 app[web.1]: npm ERR! Exit status 1
 2018-07-25T19:59:02.093992+00:00 app[web.1]: npm ERR!
 2018-07-25T19:59:02.093995+00:00 app[web.1]: npm ERR! Failed at the node-js- 
 sample@0.2.0 start script 'node index.js'.
 2018-07-25T19:59:02.093996+00:00 app[web.1]: npm ERR! This is most likely a 
 problem with the node-js-sample package,
 2018-07-25T19:59:02.093998+00:00 app[web.1]: npm ERR! not with npm itself.
 2018-07-25T19:59:02.094000+00:00 app[web.1]: npm ERR! Tell the author that 
 this fails on your system:
 2018-07-25T19:59:02.094001+00:00 app[web.1]: npm ERR!     node index.js
 2018-07-25T19:59:02.094004+00:00 app[web.1]: npm ERR! You can get their info 
 via:
 2018-07-25T19:59:02.094006+00:00 app[web.1]: npm ERR!     npm owner ls node- 
 js-sample
 2018-07-25T19:59:02.094008+00:00 app[web.1]: npm ERR! There is likely 
 additional logging output above.
 2018-07-25T19:59:02.111541+00:00 app[web.1]: 
 2018-07-25T19:59:02.112009+00:00 app[web.1]: npm ERR! Please include the 
 following file with any support request:
 2018-07-25T19:59:02.112252+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
 2018-07-25T19:59:02.190555+00:00 heroku[web.1]: Process exited with status 1
 2018-07-25T19:59:02.208359+00:00 heroku[web.1]: State changed from starting 
 to crashed

我不确定是否需要在中央存储区中添加一些文件或文件夹,或者是否需要更改package.json。

0 个答案:

没有答案