heroku尝试部署微型浏览器

时间:2019-10-22 11:51:27

标签: node.js heroku

我正在尝试通过github在heroku上部署应用程序,并每次都得到此错误日志。

  

{2019-10-22T04:46:56.976381 + 00:00 heroku [web.1]:进程退出,状态为1       2019-10-22T04:46:56.913376 + 00:00 app [web.1]:npm错误!缺少脚本:开始       2019-10-22T04:46:56.923746 + 00:00 app [web.1]:       2019-10-22T04:46:56.924056 + 00:00 app [web.1]:npm错误!可以在以下位置找到此运行的完整日志:       2019-10-22T04:46:56.924182 + 00:00 app [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 app [web.1]:npm错误!缺少脚本:开始       2019-10-22T11:57:15.010793 + 00:00 app [web.1]:       2019-10-22T11:57:15.014646 + 00:00 app [web.1]:npm错误!可以在以下位置找到此运行的完整日志:       2019-10-22T11:57:15.015382 + 00:00 app [web.1]:npm错误! /app/.npm/_logs/2019-10-22T11_57_15_002Z-debug.log       2019-10-22T11:57:17.209791 + 00:00 heroku [router]:at =错误代码= H10 desc =“应用程序崩溃”方法= GET路径=“ /” 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 =错误代码= H20 desc =“应用启动超时”方法=获取路径=“ /”主机= browserbyfazal.herokuapp.com request_id = e5037711- 4e60-4bf6-921c-8edf6e2bff03 fwd =“ 71.201.83.129” dyno = connect =服务=状态= 503字节=协议= https     2019-10-22T21:58:55.387616 + 00:00 heroku [router]:at =错误代码= H10 desc =“应用程序崩溃”方法=获取路径=“ /”主机= browserbyfazal.herokuapp.com request_id = 256dfa93-0362 -487f-b809-f9d476f5524c fwd =“ 71.201.83.129” dyno = connect =服务=状态= 503字节=协议= https     2019-10-22T21:58:56.692461 + 00:00 heroku [router]:at =错误代码= H10 desc =“应用程序崩溃”方法= GET路径=“ / favicon.ico”主机= browserbyfazal.herokuapp.com request_id = c118698d-3fd7-4cec-86b7-cbf51bcf3cc7 fwd =“ 71.201.83.129” dyno = connect = service = status = 503字节= protocol = https

1 个答案:

答案 0 :(得分:0)

请在您的package.json中添加启动脚本

请参阅here

在package.json中的脚本内尝试添加

"scripts": {
        "start":"npm start",
        ... //Ur previous scripts
    },