【问题标题】:Heroku node js app not getting deployedHeroku node js应用程序未部署
【发布时间】:2018-01-27 14:19:16
【问题描述】:
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 是 { “名称”:“投资组合”, “版本”:“1.0.0”, "description": "展示自我技能", “主”:“index.html”, “脚本”:{ “开始”:“npm 运行精简版”, "test": "echo \"错误:没有指定测试\" && exit 1", “精简版”:“精简版服务器” }, “作者”:“Vikranth Kanumuru”, “许可证”:“ISC”, “devDependencies”:{

},

“引擎”:{ “节点”:“8.4.0” }, “依赖”:{ "引导程序": "^4.0.0-alpha.6", "字体真棒": "^4.7.0", “精简服务器”:“^2.3.0” } } 我不能把它放在评论里,所以我把它放在这里。

【问题讨论】:

  • 现在你已经删除了lite-server,heroku 启动脚本lite-server 写入package.jsonscripts 属性。所以你得到这个错误是正常的。
  • 能否解释一下我听不懂
  • 检查我关于您的第一个问题的新答案 ;) 对于第二个问题,请阅读此内容,您将了解:docs.npmjs.com/cli/run-script
  • 先生,您可以添加修改后的 package.json 文件吗?抱歉,对此完全陌生
  • 我用package.json编辑了我的答案。

标签: node.js heroku package.json


【解决方案1】:

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

Doc of 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"
  }
}

【讨论】:

  • 未检测到 bs-config.jsonbs-config.js 覆盖文件。在添加修改后的 package.json 文件后,使用 lite-server 默认值...日志文件显示了这个先生。真的很抱歉反复询问
  • 删除 lite 服务器模块不会解决问题吗??
【解决方案2】:

我猜 heroku 没有安装 lite-server,因为它在 devDependencies 中列出。在生产模式下运行站点不需要列出在那里的内容。

您可以将该依赖项移至dependencies,它应该可以工作。


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

【讨论】:

  • 先生,我移动了它,但是
猜你喜欢
  • 2014-12-13
  • 1970-01-01
  • 2018-01-25
  • 2022-01-14
  • 2017-11-27
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-12-24
相关资源
最近更新 更多