我无法理解为什么我的节点/快递应用程序无法在Heroku中运行。我相信我已经尝试了文档中的所有建议,日志似乎对我没有帮助......任何想法?我只有邮政路线...而且没有前端引擎,但邮递员也没有工作......
heroku记录尾巴...
heroku[router]: at=error code=H10 desc="App crashed" method=GET
path="/favicon.ico" host=murmuring-everglades-26713.herokuapp.com
request_id=6a951e0f-b61f-4773-88da-50ee60233767 fwd="73.95.132.206" dyno=
connect= service= status=503 bytes= protocol=https
在git push heroku master
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 362 bytes | 0 bytes/s, done.
Total 4 (delta 3), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NPM_CONFIG_PRODUCTION=true
remote: NODE_VERBOSE=false
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=false
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): unspecified
remote: engines.npm (package.json): unspecified (use default)
remote:
remote: Resolving node version 8.x...
remote: Downloading and installing node 8.10.0...
remote: Using default npm version: 5.6.0
remote:
remote: -----> Restoring cache
remote: Skipping cache restore (disabled)
remote:
remote: -----> Building dependencies
remote: Installing node modules (package.json + package-lock)
remote:
remote: > bcrypt@1.0.3 install /tmp/build_a32a25aa8fefa1e63392a939011c6fa3/node_modules/bcrypt
remote: > node-pre-gyp install --fallback-to-build
remote:
remote: [bcrypt] Success: "/tmp/build_a32a25aa8fefa1e63392a939011c6fa3/node_modules/bcrypt/lib/binding/bcrypt_lib.node" is installed via remote
remote: added 213 packages in 5.932s
remote:
remote: -----> Caching build
remote: Clearing previous node cache
remote: Skipping cache save (disabled by config)
remote:
remote: -----> Pruning devDependencies
remote: Skipping because NPM_CONFIG_PRODUCTION is 'true'
remote:
remote: -----> Build succeeded!
remote: -----> Discovering process types
remote: Procfile declares types -> web
remote:
remote: -----> Compressing...
remote: Done: 20.8M
remote: -----> Launching...
remote: Released v13
remote: https://murmuring-everglades-26713.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/murmuring-everglades-26713.git
7ccf581..a5444dc master -> master
答案 0 :(得分:1)
它 WAS env变量......我明白为什么我需要告诉heroku,但是看不出那些怎么会出现在日志的某个地方......我大概有12个env变量通过out,所以是的。
FIX:在app目录/ root
中$ heroku config:set JWT_SECRET=[your secret]
$ heroku config:set GOOGLE_CLIENT_ID=[############]
$ heroku config:set FACEBOOK_CLIENT_ID=[########}
加上大约十几个...在邮递员工作,预计不能GET /在浏览器中,
我今天学到了很多关于heroku和node.js的知识......
谢谢@JSilv