【发布时间】:2018-01-16 19:16:57
【问题描述】:
当 HEROKU 构建成功时,我在将流星应用程序部署到 HEROKU 时收到此错误消息: 应用程序发生错误,无法提供您的页面。如果您是应用程序所有者,请查看您的日志以了解详细信息。
我认为这与项目中的NODE版本不兼容有关。目前项目显示如下(我在项目文件中手动更改了这个以匹配 HEROKU 命令行提示的 NODE 版本。 meteor/local/build/.node_version.txt : v8.3.0
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=true
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.9.4...
remote: Using default npm version: 5.6.0
remote:
remote: -----> Restoring cache
remote: Skipping cache restore (not-found)
remote:
remote: -----> Building dependencies
remote: Installing node modules (package.json + package-lock)
remote:
remote: > bcrypt@1.0.3 install /tmp/build_716b8c55d4775b8c4db0d8c2018f489f/node_modules/bcrypt
remote: > node-pre-gyp install --fallback-to-build
remote:
remote: [bcrypt] Success: "/tmp/build_716b8c55d4775b8c4db0d8c2018f489f/node_modules/bcrypt/lib/binding/bcrypt_lib.node" is installed via remote
remote: added 195 packages in 5.765s
remote:
remote: -----> Caching build
remote: Clearing previous node cache
remote: Saving 2 cacheDirectories (default):
remote: - node_modules
remote: - bower_components (nothing to cache)
remote:
remote: -----> Build succeeded!
remote: -----> Discovering process types
remote: Procfile declares types -> (none)
remote: Default types for buildpack -> web
remote:
remote: -----> Compressing...
remote: Done: 44.3M
remote: -----> Launching...
remote: Released v3
remote: https://missionary-expediters-app.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/missionary-expediters-app.git
* [new branch] master -> master
➜ Missionary-Expediters-Web-Application git:(master) heroku logs
2018-01-16T03:58:30.407001+00:00 app[api]: Initial release by user angelica@seaworthy.tech
2018-01-16T03:58:30.407001+00:00 app[api]: Release v1 created by user angelica@seaworthy.tech
2018-01-16T03:58:30.641875+00:00 app[api]: Release v2 created by user angelica@seaworthy.tech
2018-01-16T03:58:30.641875+00:00 app[api]: Enable Logplex by user angelica@seaworthy.tech
2018-01-16T03:59:43.000000+00:00 app[api]: Build started by user angelica@seaworthy.tech
2018-01-16T03:59:59.490555+00:00 app[api]: Deploy f900129c by user angelica@seaworthy.tech
2018-01-16T03:59:59.510788+00:00 app[api]: Scaled to web@1:Free by user angelica@seaworthy.tech
2018-01-16T03:59:43.000000+00:00 app[api]: Build succeeded
2018-01-16T04:00:03.035774+00:00 heroku[web.1]: Starting process with command `npm start`
2018-01-16T03:59:59.490555+00:00 app[api]: Release v3 created by user angelica@seaworthy.tech
2018-01-16T04:00:05.155112+00:00 app[web.1]: > Missionary-Expediters-Web-Application@ start /app
2018-01-16T04:00:05.155090+00:00 app[web.1]:
2018-01-16T04:00:05.168004+00:00 app[web.1]: npm ERR! file sh
2018-01-16T04:00:05.155113+00:00 app[web.1]: > meteor run
2018-01-16T04:00:05.155114+00:00 app[web.1]:
2018-01-16T04:00:05.168910+00:00 app[web.1]: npm ERR! errno ENOENT
2018-01-16T04:00:05.162754+00:00 app[web.1]: sh: 1: meteor: not found
2018-01-16T04:00:05.171081+00:00 app[web.1]: npm ERR! spawn ENOENT
2018-01-16T04:00:05.171090+00:00 app[web.1]: npm ERR!
2018-01-16T04:00:05.168907+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2018-01-16T04:00:05.168911+00:00 app[web.1]: npm ERR! syscall spawn
2018-01-16T04:00:05.170446+00:00 app[web.1]: npm ERR! Missionary-Expediters-Web-Application@ start: `meteor run`
2018-01-16T04:00:05.171096+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2018-01-16T04:00:05.171091+00:00 app[web.1]: npm ERR! Failed at the Missionary-Expediters-Web-Application@ start script.
2018-01-16T04:00:05.176036+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2018-01-16T04:00:05.175802+00:00 app[web.1]:
2018-01-16T04:00:05.176169+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2018-01-16T04_00_05_172Z-debug.log
2018-01-16T04:00:05.242382+00:00 heroku[web.1]: State changed from starting to crashed
2018-01-16T04:00:05.244044+00:00 heroku[web.1]: State changed from crashed to starting
2018-01-16T04:00:05.230580+00:00 heroku[web.1]: Process exited with status 1
2018-01-16T04:00:08.424396+00:00 heroku[web.1]: Starting process with command `npm start`
2018-01-16T04:00:10.625159+00:00 heroku[web.1]: State changed from starting to crashed
2018-01-16T04:00:10.612429+00:00 heroku[web.1]: Process exited with status 1
2018-01-16T04:00:10.540497+00:00 app[web.1]:
2018-01-16T04:00:10.540515+00:00 app[web.1]: > Missionary-Expediters-Web-Application@ start /app
2018-01-16T04:00:10.540516+00:00 app[web.1]: > meteor run
2018-01-16T04:00:10.540517+00:00 app[web.1]:
2018-01-16T04:00:10.546730+00:00 app[web.1]: sh: 1: meteor: not found
2018-01-16T04:00:10.552451+00:00 app[web.1]: npm ERR! file sh
2018-01-16T04:00:10.552644+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2018-01-16T04:00:10.552794+00:00 app[web.1]: npm ERR! errno ENOENT
2018-01-16T04:00:10.552930+00:00 app[web.1]: npm ERR! syscall spawn
2018-01-16T04:00:10.554224+00:00 app[web.1]: npm ERR! Missionary-Expediters-Web-Application@ start: `meteor run`
2018-01-16T04:00:10.554544+00:00 app[web.1]: npm ERR!
2018-01-16T04:00:10.554414+00:00 app[web.1]: npm ERR! spawn ENOENT
2018-01-16T04:00:10.554639+00:00 app[web.1]: npm ERR! Failed at the Missionary-Expediters-Web-Application@ start script.
2018-01-16T04:00:10.559460+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2018-01-16T04:00:10.559334+00:00 app[web.1]:
2018-01-16T04:00:10.554754+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2018-01-16T04:00:10.559520+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2018-01-16T04_00_10_556Z-debug.log
关于如何启动和运行应用程序有什么建议吗?它适用于本地主机
【问题讨论】: