Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 在heroku上部署meteor应用程序时出错_Node.js_Meteor_Heroku - Fatal编程技术网

Node.js 在heroku上部署meteor应用程序时出错

Node.js 在heroku上部署meteor应用程序时出错,node.js,meteor,heroku,Node.js,Meteor,Heroku,我已经在heroku上部署了我的应用程序,并且在本地运行良好,但是当我打开我的应用程序时,我收到一条消息“应用程序错误应用程序中出现错误,无法提供您的页面。如果您是应用程序所有者,请查看您的日志以了解详细信息。” 当我输入“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.

我已经在heroku上部署了我的应用程序,并且在本地运行良好,但是当我打开我的应用程序时,我收到一条消息“应用程序错误应用程序中出现错误,无法提供您的页面。如果您是应用程序所有者,请查看您的日志以了解详细信息。” 当我输入“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

您收到的错误表明未找到meteor命令。如果应用程序在项目的
package.json
文件中没有将meteor列为依赖项,则会发生这种情况


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

使用此版本并将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"
  }
}

我遇到另一个错误:\n另一个错误与此无关。从你的另一篇文章来看,你的项目repo可能存在多个问题:依赖项被检查到源代码管理中,等等。你应该先关闭这个问题,然后让其他人回答另一个问题。你必须添加“引擎”属性吗?默认情况下,My package.json没有它。Thx@AlanWunsche我真的不知道为什么它最终会起作用(因为buildpack或package.json的变化,因为我同时做了这两件事),但我现在可以告诉你,我已经删除了我的package.json的“engines”属性,它仍然起作用。所以它可能是构建包。。如果你仍然面临着麻烦,让我知道,也许我可以帮助我,我也有这个问题。在我的例子中,我遵循这些说明并配置了这个构建:在我提交并推送git,并使用命令行推送heroku之后,它就工作了。