首页 文章

Heroku节点js应用程序未部署

提问于
浏览
1
2017-08-18T19:44:41.708047+00:00 app[web.1]: npm ERR! Failed at the portfolio@1.0.0 lite script 'lite-server'.
2017-08-18T19:44:41.708173+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.
2017-08-18T19:44:41.708306+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the portfolio package,
2017-08-18T19:44:41.708434+00:00 app[web.1]: npm ERR! not with npm itself.
2017-08-18T19:44:41.708561+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2017-08-18T19:44:41.708683+00:00 app[web.1]: npm ERR!     lite-server
2017-08-18T19:44:41.708807+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2017-08-18T19:44:41.708929+00:00 app[web.1]: npm ERR!     npm bugs portfolio
2017-08-18T19:44:41.709057+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2017-08-18T19:44:41.709183+00:00 app[web.1]: npm ERR!     npm owner ls portfolio
2017-08-18T19:44:41.709319+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2017-08-18T19:44:41.712641+00:00 app[web.1]:
2017-08-18T19:44:41.712955+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2017-08-18T19:44:41.713066+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
2017-08-18T19:44:41.725193+00:00 app[web.1]:
2017-08-18T19:44:41.733439+00:00 app[web.1]: npm ERR! Linux 3.13.0-123-generic
2017-08-18T19:44:41.733738+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2017-08-18T19:44:41.734006+00:00 app[web.1]: npm ERR! node v6.11.2
2017-08-18T19:44:41.734145+00:00 app[web.1]: npm ERR! npm  v3.10.10
2017-08-18T19:44:41.734495+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2017-08-18T19:44:41.734628+00:00 app[web.1]: npm ERR! portfolio@1.0.0 start: `npm run lite`
2017-08-18T19:44:41.734822+00:00 app[web.1]: npm ERR! Exit status 1
2017-08-18T19:44:41.734940+00:00 app[web.1]: npm ERR!
2017-08-18T19:44:41.735081+00:00 app[web.1]: npm ERR! Failed at the portfolio@1.0.0 start script 'npm run lite'.
2017-08-18T19:44:41.735210+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.
2017-08-18T19:44:41.735324+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the portfolio package,
2017-08-18T19:44:41.735360+00:00 app[web.1]: npm ERR! not with npm itself.
2017-08-18T19:44:41.735547+00:00 app[web.1]: npm ERR!     npm run lite
2017-08-18T19:44:41.735475+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2017-08-18T19:44:41.735645+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2017-08-18T19:44:41.735822+00:00 app[web.1]: npm ERR!     npm bugs portfolio
2017-08-18T19:44:41.735902+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2017-08-18T19:44:41.735977+00:00 app[web.1]: npm ERR!     npm owner ls portfolio
2017-08-18T19:44:41.736060+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2017-08-18T19:44:41.739848+00:00 app[web.1]:
2017-08-18T19:44:41.740006+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2017-08-18T19:44:41.740084+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
2017-08-18T19:44:41.819089+00:00 heroku[web.1]: Process exited with status 1
2017-08-18T19:44:41.834556+00:00 heroku[web.1]: State changed from starting to crashed
2017-08-18T19:56:04.761943+00:00 heroku[web.1]: State changed from crashed to starting
2017-08-18T19:56:07.835903+00:00 heroku[web.1]: Starting process with command `npm start`
2017-08-18T19:56:10.466158+00:00 app[web.1]:
2017-08-18T19:56:10.466178+00:00 app[web.1]: > portfolio@1.0.0 start /app
2017-08-18T19:56:10.466179+00:00 app[web.1]: > npm run lite
2017-08-18T19:56:10.466180+00:00 app[web.1]:
2017-08-18T19:56:11.070205+00:00 app[web.1]: > portfolio@1.0.0 lite /app
2017-08-18T19:56:11.070184+00:00 app[web.1]:
2017-08-18T19:56:11.070207+00:00 app[web.1]: > lite-server
2017-08-18T19:56:11.075102+00:00 app[web.1]: sh: 1: lite-server: not found
2017-08-18T19:56:11.086994+00:00 app[web.1]: npm ERR! Linux 3.13.0-123-generic
2017-08-18T19:56:11.070207+00:00 app[web.1]:
2017-08-18T19:56:11.087263+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "run" "lite"
2017-08-18T19:56:11.079084+00:00 app[web.1]:
2017-08-18T19:56:11.087612+00:00 app[web.1]: npm ERR! npm  v3.10.10
2017-08-18T19:56:11.087475+00:00 app[web.1]: npm ERR! node v6.11.2
2017-08-18T19:56:11.087890+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2017-08-18T19:56:11.087752+00:00 app[web.1]: npm ERR! file sh
2017-08-18T19:56:11.088012+00:00 app[web.1]: npm ERR! errno ENOENT
2017-08-18T19:56:11.088403+00:00 app[web.1]: npm ERR! spawn ENOENT
2017-08-18T19:56:11.088143+00:00 app[web.1]: npm ERR! syscall spawn
2017-08-18T19:56:11.088630+00:00 app[web.1]: npm ERR! Failed at the portfolio@1.0.0 lite script 'lite-server'.
2017-08-18T19:56:11.088316+00:00 app[web.1]: npm ERR! portfolio@1.0.0 lite: `lite-server`
2017-08-18T19:56:11.088526+00:00 app[web.1]: npm ERR!
2017-08-18T19:56:11.088775+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the portfolio package,
2017-08-18T19:56:11.089100+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2017-08-18T19:56:11.088750+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.
2017-08-18T19:56:11.088879+00:00 app[web.1]: npm ERR! not with npm itself.
2017-08-18T19:56:11.089613+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2017-08-18T19:56:11.089243+00:00 app[web.1]: npm ERR!     lite-server
2017-08-18T19:56:11.089488+00:00 app[web.1]: npm ERR!     npm bugs portfolio
2017-08-18T19:56:11.089862+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2017-08-18T19:56:11.089360+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2017-08-18T19:56:11.089737+00:00 app[web.1]: npm ERR!     npm owner ls portfolio
2017-08-18T19:56:11.093343+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2017-08-18T19:56:11.093132+00:00 app[web.1]:
2017-08-18T19:56:11.093450+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
2017-08-18T19:56:11.104510+00:00 app[web.1]:
2017-08-18T19:56:11.114918+00:00 app[web.1]: npm ERR! npm  v3.10.10
2017-08-18T19:56:11.114033+00:00 app[web.1]: npm ERR! Linux 3.13.0-123-generic
2017-08-18T19:56:11.114720+00:00 app[web.1]: npm ERR! node v6.11.2
2017-08-18T19:56:11.114428+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2017-08-18T19:56:11.116440+00:00 app[web.1]: npm ERR!
2017-08-18T19:56:11.115676+00:00 app[web.1]: npm ERR! portfolio@1.0.0 start: `npm run lite`
2017-08-18T19:56:11.116745+00:00 app[web.1]: npm ERR! Failed at the portfolio@1.0.0 start script 'npm run lite'.
2017-08-18T19:56:11.115436+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2017-08-18T19:56:11.115922+00:00 app[web.1]: npm ERR! Exit status 1
2017-08-18T19:56:11.119244+00:00 app[web.1]: npm ERR! not with npm itself.
2017-08-18T19:56:11.117512+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the portfolio package,
2017-08-18T19:56:11.119857+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2017-08-18T19:56:11.117312+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.
2017-08-18T19:56:11.120113+00:00 app[web.1]: npm ERR!     npm run lite
2017-08-18T19:56:11.120530+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2017-08-18T19:56:11.121004+00:00 app[web.1]: npm ERR!     npm bugs portfolio
2017-08-18T19:56:11.121459+00:00 app[web.1]: npm ERR!     npm owner ls portfolio
2017-08-18T19:56:11.121641+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2017-08-18T19:56:11.121256+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2017-08-18T19:56:11.127484+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
2017-08-18T19:56:11.127098+00:00 app[web.1]:
2017-08-18T19:56:11.127356+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2017-08-18T19:56:11.213404+00:00 heroku[web.1]: State changed from starting to crashed
2017-08-18T19:56:11.198000+00:00 heroku[web.1]: Process exited with status 1

这是错误日志文件

package.json文件是

{
  "name": "portfolio",
  "version": "1.0.0",
  "description": "Displaying self skills",
  "main": "index.html",
  "scripts": {
    "start": "npm run lite",
    "test": "echo \"Error: no test specified\" && exit 1",
    "lite": "lite-server"
  },
  "author": "Vikranth Kanumuru",
  "license": "ISC",
  "devDependencies": {
    "lite-server": "^2.3.0"
  },
  "dependencies": {
    "bootstrap": "^4.0.0-alpha.6",
    "font-awesome": "^4.7.0"
  }
}

该网站在本地服务器上工作正常,甚至与heroku本地网络一起使用但是因为上述错误而崩溃了npm包是最新的

我尝试删除lite脚本然后提交然后部署,但这也没有用

我试图找到错误但无法取悦 .

将liteserver移动到依赖项后

日志文件是

2017-08-18T20:23:16.489546+00:00 app[web.1]:
2017-08-18T20:23:16.489568+00:00 app[web.1]: > portfolio@1.0.0 start /app
2017-08-18T20:23:16.489569+00:00 app[web.1]: > npm run lite
2017-08-18T20:23:16.489570+00:00 app[web.1]:
2017-08-18T20:23:17.508804+00:00 app[web.1]:
2017-08-18T20:23:17.508810+00:00 app[web.1]: > portfolio@1.0.0 lite /app
2017-08-18T20:23:17.546486+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2017-08-18T20:23:17.508812+00:00 app[web.1]:
2017-08-18T20:23:17.518042+00:00 app[web.1]: sh: 1: lite-server: not found
2017-08-18T20:23:17.547397+00:00 app[web.1]: npm ERR! portfolio@1.0.0 lite: `lite-server`
2017-08-18T20:23:17.508811+00:00 app[web.1]: > lite-server
2017-08-18T20:23:17.552475+00:00 app[web.1]: npm ERR! Failed at the portfolio@1.0.0 lite script.
2017-08-18T20:23:17.547633+00:00 app[web.1]: npm ERR! spawn ENOENT
2017-08-18T20:23:17.547922+00:00 app[web.1]: npm ERR!
2017-08-18T20:23:17.555969+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2017-08-18T20:23:17.545582+00:00 app[web.1]: npm ERR! file sh
2017-08-18T20:23:17.546830+00:00 app[web.1]: npm ERR! errno ENOENT
2017-08-18T20:23:17.547103+00:00 app[web.1]: npm ERR! syscall spawn
2017-08-18T20:23:17.570546+00:00 app[web.1]:
2017-08-18T20:23:17.570802+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2017-08-18T20:23:17.623863+00:00 app[web.1]: npm ERR! portfolio@1.0.0 start: `npm run lite`
2017-08-18T20:23:17.570948+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2017-08-18T20_23_17_531Z-debug.log
2017-08-18T20:23:17.623455+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2017-08-18T20:23:17.623689+00:00 app[web.1]: npm ERR! errno 1
2017-08-18T20:23:17.624496+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2017-08-18T20:23:17.625545+00:00 app[web.1]:
2017-08-18T20:23:17.624015+00:00 app[web.1]: npm ERR! Exit status 1
2017-08-18T20:23:17.625895+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2017-08-18T20:23:17.624183+00:00 app[web.1]: npm ERR!
2017-08-18T20:23:17.626003+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2017-08-18T20_23_17_610Z-debug.log
2017-08-18T20:23:17.624342+00:00 app[web.1]: npm ERR! Failed at the portfolio@1.0.0 start script.
2017-08-18T20:23:17.788754+00:00 heroku[web.1]: Process exited with status 1
2017-08-18T20:23:17.804560+00:00 heroku[web.1]: State changed from starting to crashed
2017-08-18T20:24:22.252405+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=hidden-oasis-28106.herokuapp.com request_id=34b1dd02-e75a-400b-a7a6-7b611f60372f fwd="157.50.8.21" dyno= connect= service= status=503 bytes= protocol=https
2017-08-18T20:29:50.602309+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=hidden-oasis-28106.herokuapp.com request_id=3f4f9a84-3081-4b96-a078-89f404ddfeb3 fwd="157.50.8.21" dyno= connect= service= status=503 bytes= protocol=https
2017-08-18T20:35:04.704313+00:00 heroku[web.1]: State changed from crashed to starting
2017-08-18T20:35:06.664888+00:00 heroku[web.1]: Starting process with command `npm start`
2017-08-18T20:35:10.881400+00:00 app[web.1]:
2017-08-18T20:35:10.881410+00:00 app[web.1]: > npm run lite
2017-08-18T20:35:10.881410+00:00 app[web.1]: > portfolio@1.0.0 start /app
2017-08-18T20:35:10.881411+00:00 app[web.1]:
2017-08-18T20:35:11.913060+00:00 app[web.1]:
2017-08-18T20:35:11.913072+00:00 app[web.1]: > portfolio@1.0.0 lite /app
2017-08-18T20:35:11.913072+00:00 app[web.1]: > lite-server
2017-08-18T20:35:11.913073+00:00 app[web.1]:
2017-08-18T20:35:11.920446+00:00 app[web.1]: sh: 1: lite-server: not found
2017-08-18T20:35:11.944906+00:00 app[web.1]: npm ERR! file sh
2017-08-18T20:35:11.945211+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2017-08-18T20:35:11.945442+00:00 app[web.1]: npm ERR! errno ENOENT
2017-08-18T20:35:11.945920+00:00 app[web.1]: npm ERR! portfolio@1.0.0 lite: `lite-server`
2017-08-18T20:35:11.945674+00:00 app[web.1]: npm ERR! syscall spawn
2017-08-18T20:35:11.946095+00:00 app[web.1]: npm ERR! spawn ENOENT
2017-08-18T20:35:11.946309+00:00 app[web.1]: npm ERR!
2017-08-18T20:35:11.946516+00:00 app[web.1]: npm ERR! Failed at the portfolio@1.0.0 lite script.
2017-08-18T20:35:11.968813+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2017-08-18T20:35:11.946693+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2017-08-18T20:35:11.948500+00:00 app[web.1]:
2017-08-18T20:35:11.948745+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2017-08-18T20:35:11.948891+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2017-08-18T20_35_11_930Z-debug.log
2017-08-18T20:35:11.969079+00:00 app[web.1]: npm ERR! errno 1
2017-08-18T20:35:11.969447+00:00 app[web.1]: npm ERR! Exit status 1
2017-08-18T20:35:11.969275+00:00 app[web.1]: npm ERR! portfolio@1.0.0 start: `npm run lite`
2017-08-18T20:35:11.969622+00:00 app[web.1]: npm ERR!
2017-08-18T20:35:11.969809+00:00 app[web.1]: npm ERR! Failed at the portfolio@1.0.0 start script.
2017-08-18T20:35:11.970006+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2017-08-18T20:35:11.971505+00:00 app[web.1]:
2017-08-18T20:35:11.971728+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2017-08-18T20:35:11.971880+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2017-08-18T20_35_11_963Z-debug.log
2017-08-18T20:35:12.105152+00:00 heroku[web.1]: State changed from starting to crashed
2017-08-18T20:35:12.090364+00:00 heroku[web.1]: Process exited with status 1
2017-08-18T20:37:53.000000+00:00 app[api]: Build started by user saivicky2015@gmail.com
2017-08-18T20:38:19.813964+00:00 heroku[web.1]: State changed from crashed to starting
2017-08-18T20:38:19.435208+00:00 app[api]: Deploy bdaf4749 by user saivicky2015@gmail.com
2017-08-18T20:38:19.435208+00:00 app[api]: Release v7 created by user saivicky2015@gmail.com
2017-08-18T20:37:53.000000+00:00 app[api]: Build succeeded
2017-08-18T20:38:23.462016+00:00 heroku[web.1]: Starting process with command `npm start`
2017-08-18T20:38:27.290378+00:00 app[web.1]:
2017-08-18T20:38:27.290394+00:00 app[web.1]: > portfolio@1.0.0 start /app
2017-08-18T20:38:27.290395+00:00 app[web.1]: > npm run lite
2017-08-18T20:38:27.290395+00:00 app[web.1]:
2017-08-18T20:38:28.147286+00:00 app[web.1]:
2017-08-18T20:38:28.147298+00:00 app[web.1]: > portfolio@1.0.0 lite /app
2017-08-18T20:38:28.147299+00:00 app[web.1]: > lite-server
2017-08-18T20:38:28.147299+00:00 app[web.1]:
2017-08-18T20:38:29.567913+00:00 app[web.1]: Did not detect a `bs-config.json` or `bs-config.js` override file. Using lite-server defaults...
2017-08-18T20:38:29.570317+00:00 app[web.1]: ** browser-sync config **
2017-08-18T20:38:29.574243+00:00 app[web.1]: { injectChanges: false,
2017-08-18T20:38:29.574245+00:00 app[web.1]:   files: [ './**/*.{html,htm,css,js}' ],
2017-08-18T20:38:29.574246+00:00 app[web.1]:   watchOptions: { ignored: 'node_modules' },
2017-08-18T20:38:29.574247+00:00 app[web.1]:   server: { baseDir: './', middleware: [ [Function], [Function] ] } }
2017-08-18T20:38:29.780891+00:00 app[web.1]: [Browsersync] Access URLs:
2017-08-18T20:38:29.781317+00:00 app[web.1]:  ---------------------------------------
2017-08-18T20:38:29.781937+00:00 app[web.1]:        Local: http://localhost:3000
2017-08-18T20:38:29.782215+00:00 app[web.1]:     External: http://172.18.222.246:3000
2017-08-18T20:38:29.782426+00:00 app[web.1]:  ---------------------------------------
2017-08-18T20:38:29.782691+00:00 app[web.1]:           UI: http://localhost:3001
2017-08-18T20:38:29.782955+00:00 app[web.1]:  UI External: http://172.18.222.246:3001
2017-08-18T20:38:29.783151+00:00 app[web.1]:  ---------------------------------------
2017-08-18T20:38:29.783535+00:00 app[web.1]: [Browsersync] Serving files from: ./
2017-08-18T20:38:29.796322+00:00 app[web.1]: [Browsersync] Watching files...
2017-08-18T20:38:30.061505+00:00 app[web.1]: [Browsersync] Couldn't open browser (if you are using BrowserSync in a headless environment, you might want to set the open option to false)
2017-08-18T20:39:23.645673+00:00 heroku[web.1]: Process exited with status 137
2017-08-18T20:39:23.659964+00:00 heroku[web.1]: State changed from starting to crashed

package.json是{“name”:“portfolio”,“version”:“1.0.0”,“description”:“显示自我技能”,“main”:“index.html”,“scripts”:{“start “:”npm run lite“,”test“:”echo \“错误:未指定测试\”&&退出1“,”lite“:”lite-server“},”作者“:”Vikranth Kanumuru“,”许可证“:”ISC“,”devDependencies“:{

},

“engines”:{“node”:“8.4.0”},“dependencies”:{“bootstrap”:“^ 4.0.0-alpha.6”,“font-awesome”:“^ 4.7.0”,“ lite-server“:”^ 2.3.0“}}我无法将其放在评论中,所以我把它放在这里 .

2 回答

  • 0

    我'm guessing heroku isn' t安装lite-server,因为它列在 devDependencies 中 . 在 生产环境 模式下运行站点不应该要求列出的东西 .

    您可以将该依赖项移动到 dependencies ,它应该可以工作 .


    但是,您不应该在 生产环境 中运行此服务器 . lite-server自述文件的第一行说“轻量级 development only 节点服务器”

  • 1

    Heroku不安装devDependencies . 您必须在 package.jsondependencies 属性中添加 lite-server . 或者在链接中查看如何在heroku上安装dev和production依赖项 .

    Heroku的文件


    编辑:

    所以你的 package.json 应该是这样的:

    {
      "name": "portfolio",
      "version": "1.0.0",
      "description": "Displaying self skills",
      "main": "index.html",
      "scripts": {
        "start": "npm run lite",
        "test": "echo \"Error: no test specified\" && exit 1",
        "lite": "lite-server"
      },
      "author": "Vikranth Kanumuru",
      "license": "ISC",
      "devDependencies": {
      },
      "dependencies": {
        "lite-server": "^2.3.0",
        "bootstrap": "^4.0.0-alpha.6",
        "font-awesome": "^4.7.0"
      }
    }
    

相关问题