javascript - 部署heroku问题

标签 javascript heroku npm bcrypt

将我的应用程序推送到heroku。我似乎无法弄清楚。获取错误代码 h10。

这是否与 bcrypt 库与节点 0.12.0 不兼容有关?

2015-04-01T02:27:39.716767+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
2015-04-01T02:27:40.544711+00:00 app[web.1]:
2015-04-01T02:27:40.544716+00:00 app[web.1]: > @ start /app
2015-04-01T02:27:40.544719+00:00 app[web.1]:
2015-04-01T02:27:40.544718+00:00 app[web.1]: > node app.js
2015-04-01T02:27:41.316338+00:00 app[web.1]: npm ERR! Linux 3.13.0-40-generic
2015-04-01T02:27:41.324669+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2015-04-01T02:27:41.288648+00:00 app[web.1]:     at Function.Module._load (module.js:310:12)
2015-04-01T02:27:41.288639+00:00 app[web.1]:         throw e
2015-04-01T02:27:41.288643+00:00 app[web.1]: Error: Module did not self-register.
2015-04-01T02:27:41.288653+00:00 app[web.1]:     at bindings (/app/node_modules/bcrypt/node_modules/bindings/bindings.js:74:15)
2015-04-01T02:27:41.288655+00:00 app[web.1]:     at Object.<anonymous> (/app/node_modules/bcrypt/bcrypt.js:3:35)
2015-04-01T02:27:41.309493+00:00 app[web.1]:
2015-04-01T02:27:41.288651+00:00 app[web.1]:     at require (module.js:384:17)
2015-04-01T02:27:41.288658+00:00 app[web.1]:     at Object.Module._extensions..js (module.js:478:10)
2015-04-01T02:27:41.288660+00:00 app[web.1]:     at Module.load (module.js:355:32)
2015-04-01T02:27:41.317423+00:00 app[web.1]: npm ERR! node v0.12.0
2015-04-01T02:27:41.288657+00:00 app[web.1]:     at Module._compile (module.js:460:26)
2015-04-01T02:27:41.318635+00:00 app[web.1]: npm ERR! npm  v2.5.1
2015-04-01T02:27:41.319031+00:00 app[web.1]: npm ERR! @ start: `node app.js`
2015-04-01T02:27:41.319179+00:00 app[web.1]: npm ERR! Exit status 1
2015-04-01T02:27:41.288634+00:00 app[web.1]: /app/node_modules/bcrypt/node_modules/bindings/bindings.js:79
2015-04-01T02:27:41.288642+00:00 app[web.1]:               ^
2015-04-01T02:27:41.288650+00:00 app[web.1]:     at Module.require (module.js:365:17)
2015-04-01T02:27:41.318837+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2015-04-01T02:27:41.319384+00:00 app[web.1]: npm ERR!
2015-04-01T02:27:41.317148+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2015-04-01T02:27:41.324134+00:00 app[web.1]:
2015-04-01T02:27:41.324935+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
2015-04-01T02:27:41.288645+00:00 app[web.1]:     at Error (native)
2015-04-01T02:27:41.319494+00:00 app[web.1]: npm ERR! Failed at the @ start script 'node app.js'.
2015-04-01T02:27:41.319658+00:00 app[web.1]: npm ERR! This is most likely a problem with the  package,
2015-04-01T02:27:41.320018+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2015-04-01T02:27:41.288647+00:00 app[web.1]:     at Module.load (module.js:355:32)
2015-04-01T02:27:41.319869+00:00 app[web.1]: npm ERR! not with npm itself.
2015-04-01T02:27:41.320169+00:00 app[web.1]: npm ERR!     node app.js
2015-04-01T02:27:41.320322+00:00 app[web.1]: npm ERR! You can get their info via:
2015-04-01T02:27:41.320457+00:00 app[web.1]: npm ERR!     npm owner ls
2015-04-01T02:27:41.320597+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2015-04-01T02:27:42.206460+00:00 heroku[web.1]: State changed from starting to crashed
2015-04-01T02:27:42.197234+00:00 heroku[web.1]: Process exited with status 1
2015-04-01T02:27:43.390185+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=vingage.herokuapp.com request_id=d920530a-e7e2-4764-b058-6dee5d694e01 fwd="66.65.150.248" dyno= connect= service= status=503 bytes=
2015-04-01T02:27:44.195737+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=vingage.herokuapp.com request_id=da6df2f3-c235-4f97-bb4d-1f93f3b32dd6 fwd="66.65.150.248" dyno= connect= service= status=503 bytes=
2015-04-01T02:33:07.773065+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=vingage.herokuapp.com request_id=c22b31e9-732a-4baf-bca8-ac0818f46f18 fwd="66.65.150.248" dyno= connect= service= status=503 bytes=
2015-04-01T02:33:08.798613+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=vingage.herokuapp.com request_id=06fbfb5b-8b46-4b1d-b286-5e3fd66068af fwd="66.65.150.248" dyno= connect= service= status=503 bytes=
2015-04-01T02:34:01+00:00 heroku[slug-compiler]: Slug compilation started
2015-04-01T02:34:20+00:00 heroku[slug-compiler]: Slug compilation finished
2015-04-01T02:34:20.752112+00:00 heroku[api]: Deploy 90d886b by coo@gmail.com
2015-04-01T02:34:20.752112+00:00 heroku[api]: Release v28 created by coo@gmail.com
2015-04-01T02:34:21.379248+00:00 heroku[web.1]: State changed from crashed to starting
2015-04-01T02:34:23.966893+00:00 heroku[web.1]: Starting process with command `npm start`
2015-04-01T02:34:25.859846+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
2015-04-01T02:34:25.859883+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
2015-04-01T02:34:26.670714+00:00 app[web.1]: > node app.js
2015-04-01T02:34:26.670713+00:00 app[web.1]: > @ start /app
2015-04-01T02:34:26.670707+00:00 app[web.1]:
2015-04-01T02:34:26.670716+00:00 app[web.1]:
2015-04-01T02:34:27.403575+00:00 app[web.1]: /app/node_modules/bcrypt/node_modules/bindings/bindings.js:79
2015-04-01T02:34:27.403579+00:00 app[web.1]:         throw e
2015-04-01T02:34:27.403582+00:00 app[web.1]: Error: Module did not self-register.
2015-04-01T02:34:27.403581+00:00 app[web.1]:               ^
2015-04-01T02:34:27.403583+00:00 app[web.1]:     at Error (native)
2015-04-01T02:34:27.403585+00:00 app[web.1]:     at Module.load (module.js:355:32)
2015-04-01T02:34:27.403586+00:00 app[web.1]:     at Function.Module._load (module.js:310:12)
2015-04-01T02:34:27.403587+00:00 app[web.1]:     at Module.require (module.js:365:17)
2015-04-01T02:34:27.403588+00:00 app[web.1]:     at require (module.js:384:17)
2015-04-01T02:34:27.403590+00:00 app[web.1]:     at bindings (/app/node_modules/bcrypt/node_modules/bindings/bindings.js:74:15)
2015-04-01T02:34:27.403591+00:00 app[web.1]:     at Object.<anonymous> (/app/node_modules/bcrypt/bcrypt.js:3:35)
2015-04-01T02:34:27.403592+00:00 app[web.1]:     at Module._compile (module.js:460:26)
2015-04-01T02:34:27.403593+00:00 app[web.1]:     at Object.Module._extensions..js (module.js:478:10)
2015-04-01T02:34:27.403594+00:00 app[web.1]:     at Module.load (module.js:355:32)
2015-04-01T02:34:27.427367+00:00 app[web.1]:
2015-04-01T02:34:27.433120+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2015-04-01T02:34:27.433335+00:00 app[web.1]: npm ERR! node v0.12.0
2015-04-01T02:34:27.433787+00:00 app[web.1]: npm ERR! npm  v2.5.1
2015-04-01T02:34:27.433959+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2015-04-01T02:34:27.434155+00:00 app[web.1]: npm ERR! @ start: `node app.js`
2015-04-01T02:34:27.434437+00:00 app[web.1]: npm ERR! Exit status 1
2015-04-01T02:34:27.434610+00:00 app[web.1]: npm ERR!
2015-04-01T02:34:27.434784+00:00 app[web.1]: npm ERR! Failed at the @ start script 'node app.js'.
2015-04-01T02:34:27.435079+00:00 app[web.1]: npm ERR! not with npm itself.
2015-04-01T02:34:27.434944+00:00 app[web.1]: npm ERR! This is most likely a problem with the  package,
2015-04-01T02:34:27.435206+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2015-04-01T02:34:27.435357+00:00 app[web.1]: npm ERR!     node app.js
2015-04-01T02:34:27.435722+00:00 app[web.1]: npm ERR!     npm owner ls
2015-04-01T02:34:27.435482+00:00 app[web.1]: npm ERR! You can get their info via:
2015-04-01T02:34:27.435907+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2015-04-01T02:34:27.443489+00:00 app[web.1]:
2015-04-01T02:34:27.432582+00:00 app[web.1]: npm ERR! Linux 3.13.0-40-generic
2015-04-01T02:34:27.443928+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2015-04-01T02:34:27.444064+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
2015-04-01T02:34:28.221570+00:00 heroku[web.1]: State changed from starting to crashed
2015-04-01T02:34:28.215840+00:00 heroku[web.1]: Process exited with status 1
2015-04-01T02:35:47.458943+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=vingage.herokuapp.com request_id=9ce0f981-9669-4d15-85b0-ea46046ea01a fwd="66.65.150.248" dyno= connect= service= status=503 bytes=
2015-04-01T02:35:47.971576+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=vingage.herokuapp.com request_id=3dc0fac9-3235-4e65-a075-57fe6115311d fwd="66.65.150.248" dyno= connect= service= status=503 bytes=

这是我的 app.js 的一部分:

var port = process.env.PORT || 6503;
var server = app.listen(port, function() {
    console.log('Express server listening on port ' + server.address().port);
});

这是我的 package.json:

{
  "dependencies": {
    "aws-sdk": "^2.0.22",
    "bcrypt": "~0.8.0",
    "body-parser": "^1",
    "browserify": "^9.0.3",
    "connect-flash": "~0.1.1",
    "cookie-parser": "~1.1.0",
    "dropzone": "~3.8.4",
    "express": "^4.12.3",
    "express-session": "~1.9.1",
    "jade": "^1",
    "mongoose": "~4.0.1",
    "multer": "^0.1.6",
    "passport": "~0.2.1",
    "passport-facebook": "~2.0.0",
    "passport-local": "1.0.0",
    "serve-favicon": "^2.1.6"
  },
  "devDependencies": {
    "gulp": "^3.8.11",
    "gulp-concat": "~2.4.1",
    "gulp-jshint": "^1.9.4",
    "gulp-livereload": "~2.1.1",
    "gulp-minify-css": "~0.3.11",
    "gulp-uglify": "~1.0.1",
    "jshint-stylish": "^1.0.1",
    "require-dir": "^0.3.0",
    "vinyl-source-stream": "^1.1.0"
  },
  "scripts": {
    "start": "node app.js"
  },
  "engines": {
    "node": "0.12.0",
    "npm": "2.5.1"
  }
}

最佳答案

没关系。我跑了:

npm install bcrypt --save

并推送到heroku,它可以工作。

关于javascript - 部署heroku问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29382097/

相关文章:

ruby-on-rails - ActionDispatch::HostAuthorization::DefaultResponseApp 被阻止的主机:xxxxxx.herokuapp.com

angular - 目标入口点 "@angular/cdk/platform"缺少依赖项

npm run watch 错误无法读取 'map' 未定义的属性

javascript - Jquery根据上面的元素动态平滑地调整底部元素的大小

Javascript 从 Json 文件获取图像和按钮下一个和上一个功能

javascript - 将数组中的随机值添加到 css 属性

iOS - 尝试使用 Fabric 存档时出现构建错误 (Twitter)

javascript - jQuery 插件剪切我的输入并将其设置在表单之外

python - Flask Heroku 应用程序无法连接到 Redis 队列

javascript - 当我只需要构建时,为什么 yarn 会安装开发依赖项?