【发布时间】:2020-02-18 13:39:26
【问题描述】:
我正在尝试通过 github 在 heroku 上部署一个应用程序,并且每次都获取此错误日志。
{ 2019-10-22T04:46:56.976381+00:00 heroku[web.1]: 进程以状态 1 退出 2019-10-22T04:46:56.913376+00:00 应用程序 [web.1]:npm 错误!缺少脚本:开始 2019-10-22T04:46:56.923746+00:00 应用[web.1]: 2019-10-22T04:46:56.924056+00:00 应用程序 [web.1]:npm 错误!可以在以下位置找到此运行的完整日志: 2019-10-22T04:46:56.924182+00:00 应用程序 [web.1]:npm 错误! /app/.npm/_logs/2019-10-22T04_46_56_915Z-debug.log 2019-10-22T04:46:57.14468+00:00 heroku[web.1]:状态从开始变为崩溃 2019-10-22T04:46:57.148344+00:00 heroku[web.1]:状态从崩溃变为开始 2019-10-22T11:57:15.000755+00:00 应用程序 [web.1]:npm 错误!缺少脚本:开始 2019-10-22T11:57:15.010793+00:00 应用[web.1]: 2019-10-22T11:57:15.014646+00:00 应用程序 [web.1]:npm 错误!可以在以下位置找到此运行的完整日志: 2019-10-22T11:57:15.015382+00:00 应用 [web.1]:npm 错误! /app/.npm/_logs/2019-10-22T11_57_15_002Z-debug.log 2019-10-22T11:57:17.209791+00:00 heroku[路由器]: at=error code=H10 desc="App crashed" method=GET path="/" host=browserbyfazal.herokuapp.com }>
这是我的 package.json 文件
{
"name": "min",
"productName": "Min",
"author": "PalmerAL",
"version": "1.11.1",
"description": "A fast, minimal browser that protects your privacy",
"electronVersion": "6.0.2",
"main": "main.build.js",
"dependencies": {
"dexie": "^1.2.0",
"dragula": "^3.6.2",
"electron-squirrel-startup": "^1.0.0",
"mousetrap": "^1.5.3",
"pdfjs-dist": "2.0.943",
"string_score": "^0.1.22"
},
"devDependencies": {
"archiver": "^3.0.0",
"browserify": "^16.2.2",
"chokidar": "^2.0.4",
"decomment": "^0.9.0",
"electron": "^6.0.2",
"electron-installer-redhat": "^2.0.0",
"electron-installer-windows": "^1.1.1",
"electron-packager": "^14.0.4",
"electron-renderify": "0.0.2",
"standard": "^7.1.0"
},
"optionalDependencies": {
"electron-installer-debian": "^1.2.0"
},
"license": "Apache-2.0",
"scripts": {
"test": "node_modules/.bin/standard --verbose js/**/*.js main/*.js",
"watch": "node ./scripts/watch.js",
"buildMain": "node ./scripts/buildMain.js",
"buildBrowser": "node ./scripts/buildBrowser.js",
"buildPreload": "node ./scripts/buildPreload.js",
"build": "npm run buildMain && npm run buildBrowser && npm run buildPreload",
"buildWindows": "npm run build && node ./scripts/buildWindows.js",
"buildMac": "npm run build && node ./scripts/buildMac.js",
"buildDebian": "npm run build && node ./scripts/buildDebian.js",
"buildRedhat": "npm run build && node ./scripts/buildRedhat.js",
"buildAll": "npm run buildWindows && npm run buildMac && npm run buildDebian && npm run buildRedhat",
"updateFilters": "node ./ext/filterLists/updateEasylist.js"
},
"repository": {
"type": "git",
"url": "https://github.com/minbrowser/min.git"
}
}
如果有人能帮助我,那将不胜感激
****新的错误代码**** 2019-10-22T21:58:53.757481+00:00 heroku[web.1]:错误 R10(启动超时)-> Web 进程未能在启动后 60 秒内绑定到 $PORT 2019-10-22T21:58:53.786108+00:00 heroku[web.1]:使用 SIGKILL 停止进程 2019-10-22T21:58:53.913021+00:00 heroku[web.1]:进程以状态 137 退出 2019-10-22T21:58:53.966524+00:00 heroku[web.1]:状态从开始变为崩溃 2019-10-22T21:58:54.33422+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path="/" host=browserbyfazal.herokuapp.com request_id=e5037711- 4e60-4bf6-921c-8edf6e2bff03 fwd="71.201.83.129" 测功机=连接=服务=状态=503字节=协议=https 2019-10-22T21:58:55.387616+00:00 heroku[路由器]: at=error code=H10 desc="App crashed" method=GET path="/" host=browserbyfazal.herokuapp.com request_id=256dfa93-0362 -487f-b809-f9d476f5524c fwd="71.201.83.129" dyno=connect=service=status=503 bytes=protocol=https 2019-10-22T21:58:56.692461+00:00 heroku[路由器]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=browserbyfazal.herokuapp.com request_id= c118698d-3fd7-4cec-86b7-cbf51bcf3cc7 fwd="71.201.83.129" dyno= connect= service= status=503 bytes= protocol=https
【问题讨论】:
-
不是很酷的意思,非常感谢,而且这整个东西对我来说都是新的,如果它是简单的那就太好了。
-
它说缺少启动脚本。您是否在 package.json 文件中添加了启动脚本?
-
我该怎么做?我的意思是我以前尝试过,但我找不到我的入口点
-
在你的 package.json 文件中添加这两个 "scripts": { "start": "node
.js" }, "engines": { "node": " " }, -
@Osama 我已经这样做了,并且没有改变我已经按照 ragu 所说的进行了操作,现在它开始加载一分钟并崩溃并显示我放在帖子底部的错误。请帮忙!谢谢你的建议。