在Heroku上部署meteor应用程序时出错

我已经在heroku上部署了我的应用程序,在本地它工作得很好,但是当我打开我的应用程序,我得到这个消息“应用程序错误应用程序中发生错误,您的网页无法送达。如果您是应用程序所有者,logging详细信息“。 当我input“heroku日志”我得到这个

2016-12-30T15:44:46.897189+00:00 app[web.1]: npm ERR! Linux 3.13.0-105-generic 2016-12-30T15:44:46.897612+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start" 2016-12-30T15:44:46.897905+00:00 app[web.1]: npm ERR! node v6.9.1 2016-12-30T15:44:46.898079+00:00 app[web.1]: npm ERR! npm v3.10.8 2016-12-30T15:44:46.898366+00:00 app[web.1]: npm ERR! file sh 2016-12-30T15:44:46.898559+00:00 app[web.1]: npm ERR! code ELIFECYCLE 2016-12-30T15:44:46.898734+00:00 app[web.1]: npm ERR! errno ENOENT 2016-12-30T15:44:46.898904+00:00 app[web.1]: npm ERR! syscall spawn 2016-12-30T15:44:46.899048+00:00 app[web.1]: npm ERR! microscope@ start: `meteor run` 2016-12-30T15:44:46.899172+00:00 app[web.1]: npm ERR! spawn ENOENT 2016-12-30T15:44:46.899311+00:00 app[web.1]: npm ERR! 2016-12-30T15:44:46.899449+00:00 app[web.1]: npm ERR! Failed at the microscope@ start script 'meteor run'. 2016-12-30T15:44:46.899572+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed. 2016-12-30T15:44:46.899691+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the microscope package, 2016-12-30T15:44:46.899815+00:00 app[web.1]: npm ERR! not with npm itself. 2016-12-30T15:44:46.899940+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system: 2016-12-30T15:44:46.900061+00:00 app[web.1]: npm ERR! meteor run 2016-12-30T15:44:46.900422+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via: 2016-12-30T15:44:46.900183+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with: 2016-12-30T15:44:46.900301+00:00 app[web.1]: npm ERR! npm bugs microscope 2016-12-30T15:44:46.900543+00:00 app[web.1]: npm ERR! npm owner ls microscope 2016-12-30T15:44:46.900664+00:00 app[web.1]: npm ERR! There is likely additional logging output above. 2016-12-30T15:44:46.903931+00:00 app[web.1]: 2016-12-30T15:44:46.904248+00:00 app[web.1]: npm ERR! Please include the following file with any support request: 2016-12-30T15:44:46.904362+00:00 app[web.1]: npm ERR! /app/npm-debug.log 2016-12-30T15:44:46.985527+00:00 heroku[web.1]: Process exited with status 1 2016-12-30T15:44:46.999587+00:00 heroku[web.1]: State changed from starting to crashed 2016-12-30T15:45:19.580505+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=hellohellohell.herokuapp.com request_id=33676d4a-942f-4621-b3e0-c3eaa486b0f1 fwd="41.217.180.223" dyno= connect= service= status=503 bytes= 2016-12-30T15:45:23.940363+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=hellohellohell.herokuapp.com request_id=d9096c8d-16df-48b3-89a6-98cdf989150c fwd="41.217.180.223" dyno= connect= service= status=503 bytes= 2016-12-30T15:48:05.018401+00:00 heroku[web.1]: State changed from crashed to starting 2016-12-30T15:48:06.814270+00:00 heroku[web.1]: Starting process with command `npm start` 2016-12-30T15:48:10.009640+00:00 app[web.1]: 2016-12-30T15:48:10.009656+00:00 app[web.1]: > microscope@ start /app 2016-12-30T15:48:10.009657+00:00 app[web.1]: > meteor run 2016-12-30T15:48:10.009658+00:00 app[web.1]: 2016-12-30T15:48:10.017655+00:00 app[web.1]: sh: 1: meteor: not found 2016-12-30T15:48:10.033331+00:00 app[web.1]: npm ERR! Linux 3.13.0-105-generic 2016-12-30T15:48:10.023737+00:00 app[web.1]: 2016-12-30T15:48:10.033621+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start" 2016-12-30T15:48:10.033903+00:00 app[web.1]: npm ERR! node v6.9.1 2016-12-30T15:48:10.034339+00:00 app[web.1]: npm ERR! npm v3.10.8 2016-12-30T15:48:10.034605+00:00 app[web.1]: npm ERR! file sh 2016-12-30T15:48:10.034877+00:00 app[web.1]: npm ERR! code ELIFECYCLE 2016-12-30T15:48:10.035062+00:00 app[web.1]: npm ERR! errno ENOENT 2016-12-30T15:48:10.035240+00:00 app[web.1]: npm ERR! syscall spawn 2016-12-30T15:48:10.035417+00:00 app[web.1]: npm ERR! microscope@ start: `meteor run` 2016-12-30T15:48:10.035590+00:00 app[web.1]: npm ERR! spawn ENOENT 2016-12-30T15:48:10.035809+00:00 app[web.1]: npm ERR! 2016-12-30T15:48:10.035964+00:00 app[web.1]: npm ERR! Failed at the microscope@ start script 'meteor run'. 2016-12-30T15:48:10.036091+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed. 2016-12-30T15:48:10.036215+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the microscope package, 2016-12-30T15:48:10.036338+00:00 app[web.1]: npm ERR! not with npm itself. 2016-12-30T15:48:10.036495+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system: 2016-12-30T15:48:10.036615+00:00 app[web.1]: npm ERR! meteor run 2016-12-30T15:48:10.036738+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with: 2016-12-30T15:48:10.036857+00:00 app[web.1]: npm ERR! npm bugs microscope 2016-12-30T15:48:10.036979+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via: 2016-12-30T15:48:10.037103+00:00 app[web.1]: npm ERR! npm owner ls microscope 2016-12-30T15:48:10.037225+00:00 app[web.1]: npm ERR! There is likely additional logging output above. 2016-12-30T15:48:10.040737+00:00 app[web.1]: 2016-12-30T15:48:10.040940+00:00 app[web.1]: npm ERR! Please include the following file with any support request: 2016-12-30T15:48:10.041058+00:00 app[web.1]: npm ERR! /app/npm-debug.log 2016-12-30T15:48:10.159157+00:00 heroku[web.1]: State changed from starting to crashed 2016-12-30T15:48:10.123673+00:00 heroku[web.1]: Process exited with status 1 2016-12-30T15:48:15.546228+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=hellohellohell.herokuapp.com request_id=6b38141e-14fc-4c21-aae5-c89c077e83b9 fwd="41.217.180.223" dyno= connect= service= status=503 bytes= 2016-12-30T15:48:16.814073+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=hellohellohell.herokuapp.com request_id=8403ae63-2852-4da6-88f0-f539a0f11520 fwd="41.217.180.223" dyno= connect= service= status=503 bytes= 2016-12-30T15:58:23.234351+00:00 heroku[web.1]: State changed from crashed to starting 2016-12-30T15:58:24.581443+00:00 heroku[web.1]: Starting process with command `npm start` 2016-12-30T15:58:25.714966+00:00 app[web.1]: 2016-12-30T15:58:25.714978+00:00 app[web.1]: > microscope@ start /app 2016-12-30T15:58:25.714979+00:00 app[web.1]: > meteor run 2016-12-30T15:58:25.714980+00:00 app[web.1]: 2016-12-30T15:58:25.721137+00:00 app[web.1]: sh: 1: meteor: not found 2016-12-30T15:58:25.725436+00:00 app[web.1]: 2016-12-30T15:58:25.732613+00:00 app[web.1]: npm ERR! Linux 3.13.0-105-generic 2016-12-30T15:58:25.732802+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start" 2016-12-30T15:58:25.732942+00:00 app[web.1]: npm ERR! node v6.9.1 2016-12-30T15:58:25.733067+00:00 app[web.1]: npm ERR! npm v3.10.8 2016-12-30T15:58:25.733189+00:00 app[web.1]: npm ERR! file sh 2016-12-30T15:58:25.733304+00:00 app[web.1]: npm ERR! code ELIFECYCLE 2016-12-30T15:58:25.733430+00:00 app[web.1]: npm ERR! errno ENOENT 2016-12-30T15:58:25.733533+00:00 app[web.1]: npm ERR! syscall spawn 2016-12-30T15:58:25.733637+00:00 app[web.1]: npm ERR! microscope@ start: `meteor run` 2016-12-30T15:58:25.733717+00:00 app[web.1]: npm ERR! spawn ENOENT 2016-12-30T15:58:25.733985+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed. 2016-12-30T15:58:25.733809+00:00 app[web.1]: npm ERR! 2016-12-30T15:58:25.733903+00:00 app[web.1]: npm ERR! Failed at the microscope@ start script 'meteor run'. 2016-12-30T15:58:25.734066+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the microscope package, 2016-12-30T15:58:25.734247+00:00 app[web.1]: npm ERR! not with npm itself. 2016-12-30T15:58:25.734328+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system: 2016-12-30T15:58:25.734412+00:00 app[web.1]: npm ERR! meteor run 2016-12-30T15:58:25.734491+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with: 2016-12-30T15:58:25.734572+00:00 app[web.1]: npm ERR! npm bugs microscope 2016-12-30T15:58:25.734650+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via: 2016-12-30T15:58:25.734723+00:00 app[web.1]: npm ERR! npm owner ls microscope 2016-12-30T15:58:25.737966+00:00 app[web.1]: 2016-12-30T15:58:25.734832+00:00 app[web.1]: npm ERR! There is likely additional logging output above. 2016-12-30T15:58:25.738116+00:00 app[web.1]: npm ERR! Please include the following file with any support request: 2016-12-30T15:58:25.738194+00:00 app[web.1]: npm ERR! /app/npm-debug.log 2016-12-30T15:58:25.824057+00:00 heroku[web.1]: State changed from starting to crashed 2016-12-30T15:58:25.784111+00:00 heroku[web.1]: Process exited with status 1 

你得到的错误说没有findmeteor命令。 如果您的应用程序没有将meteor列为项目的package.json文件中的依赖项,则会发生这种情况。

如果您将meteor作为依赖项添加到您的项目中,则将此更改推送到Heroku,这将导致meteor安装,并且现在应该可以访问meteor命令。

使用这个构buildhttps://github.com/AdmitHub/meteor-buildpack-horse.git并将package.json更改为

 { "name": "microscope", "engines": { "node": "6.9.2", "npm": "3.10.9" }, "scripts": { "start": "meteor run" }, "dependencies": { "babel-runtime": "^6.20.0", "meteor-node-stubs": "~0.2.0" } }