alice.do
这是错误日志文件
package.json文件是
self
该网站在本地服务器上工作正常,甚至使用heroku本地网络但是因为上述错误而崩溃,npm包是最新的
我尝试删除lite脚本,然后提交然后部署,但这也没有用
我试图找到错误但无法取悦帮助。
将liteserver移动到依赖项
之后日志文件是
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是 { “名称”:“投资组合”, “版本”:“1.0.0”, “描述”:“展示自我技能”, “main”:“index.html”, “脚本”:{ “开始”:“npm run lite”, “test”:“echo”错误:未指定测试\“&& exit 1”, “lite”:“lite-server” }, “作者”:“Vikranth Kanumuru”, “许可证”:“ISC”, “devDependencies”:{
},
“引擎”:{ “node”:“8.4.0” }, “依赖”:{ “bootstrap”:“^ 4.0.0-alpha.6”, “font-awesome”:“^ 4.7.0”, “lite-server”:“^ 2.3.0” } } 我不能把它放在评论中所以我把它放在这里。
答案 0 :(得分:1)
我猜heroku没有安装lite-server,因为它列在devDependencies
中。在生产模式下运行站点不应该要求列出的内容。
您可以将该依赖项移至dependencies
,它应该可以正常运行。
但是,您不应该在生产中运行此服务器。 lite-server自述文件的第一行说“轻量级仅开发节点服务器”
答案 1 :(得分:0)
Heroku不安装devDependencies。您必须在lite-server
的{{1}}属性中添加dependencies
。或者在链接中查看如何在heroku上安装dev和production依赖项。
编辑:
所以你的package.json
应该是这样的:
package.json