【问题标题】:Meteor your application is crashingMeteor 你的应用程序正在崩溃
【发布时间】:2018-02-13 12:25:04
【问题描述】:

我遇到了问题,我在 Windows 7-64 位上安装了 Meteor 的新副本,之后我执行了以下命令:

mkdir meteor
cd meteor
meteor create leaderboard
cd leaderboard

我确实得到了一个包含为服务器和客户端生成的东西的文件夹,但是如果我这样做了

meteor run

我收到以下错误:

C:\Users\Alex\Meteor\leaderboard>meteor run
[[[[[ C:\Users\Alex\Meteor\leaderboard ]]]]]

=> Started proxy.
=> Started MongoDB.
W20170119-11:54:04.143(2)? (STDERR) C:\Users\Alex\Meteor\leaderboard\.meteor\loc
al\build\programs\server\boot.js:348
W20170119-11:54:04.363(2)? (STDERR) }).run();
W20170119-11:54:04.363(2)? (STDERR)    ^
W20170119-11:54:04.363(2)? (STDERR)
W20170119-11:54:04.364(2)? (STDERR) Error: The babel-runtime npm package could n
ot be found in your node_modules
W20170119-11:54:04.365(2)? (STDERR) directory. Please run the following command
to install it:
W20170119-11:54:04.367(2)? (STDERR)
W20170119-11:54:04.368(2)? (STDERR)   meteor npm install --save babel-runtime
W20170119-11:54:04.369(2)? (STDERR)
W20170119-11:54:04.370(2)? (STDERR)     at meteorInstall.node_modules.meteor.bab
el-runtime.babel-runtime.js (packages\babel-runtime.js:37:9)
W20170119-11:54:04.371(2)? (STDERR)     at fileEvaluate (packages\modules-runtim
e.js:181:9)
W20170119-11:54:04.372(2)? (STDERR)     at require (packages\modules-runtime.js:
106:16)
W20170119-11:54:04.374(2)? (STDERR)     at packages\babel-runtime.js:139:15
W20170119-11:54:04.375(2)? (STDERR)     at packages\babel-runtime.js:150:3
W20170119-11:54:04.378(2)? (STDERR)     at C:\Users\Alex\Meteor\leaderboard\.met
eor\local\build\programs\server\boot.js:295:34
W20170119-11:54:04.379(2)? (STDERR)     at Array.forEach (native)
W20170119-11:54:04.381(2)? (STDERR)     at Function._.each._.forEach (C:\Users\A
lex\AppData\Local\.meteor\packages\meteor-tool\1.4.2_3\mt-os.windows.x86_32\dev_
bundle\server-lib\node_modules\underscore\underscore.js:79:11)
W20170119-11:54:04.383(2)? (STDERR)     at C:\Users\Alex\Meteor\leaderboard\.met
eor\local\build\programs\server\boot.js:128:5
W20170119-11:54:04.384(2)? (STDERR)     at C:\Users\Alex\Meteor\leaderboard\.met
eor\local\build\programs\server\boot.js:344:5
=> Exited with code: 1
W20170119-11:54:06.201(2)? (STDERR) C:\Users\Alex\Meteor\leaderboard\.meteor\loc
al\build\programs\server\boot.js:348
W20170119-11:54:06.203(2)? (STDERR) }).run();
W20170119-11:54:06.203(2)? (STDERR)    ^
W20170119-11:54:06.204(2)? (STDERR)
W20170119-11:54:06.205(2)? (STDERR) Error: The babel-runtime npm package could n
ot be found in your node_modules
W20170119-11:54:06.206(2)? (STDERR) directory. Please run the following command
to install it:
W20170119-11:54:06.208(2)? (STDERR)
W20170119-11:54:06.209(2)? (STDERR)   meteor npm install --save babel-runtime
W20170119-11:54:06.211(2)? (STDERR)
W20170119-11:54:06.211(2)? (STDERR)     at meteorInstall.node_modules.meteor.bab
el-runtime.babel-runtime.js (packages\babel-runtime.js:37:9)
W20170119-11:54:06.213(2)? (STDERR)     at fileEvaluate (packages\modules-runtim
e.js:181:9)
W20170119-11:54:06.214(2)? (STDERR)     at require (packages\modules-runtime.js:
106:16)
W20170119-11:54:06.216(2)? (STDERR)     at packages\babel-runtime.js:139:15
W20170119-11:54:06.217(2)? (STDERR)     at packages\babel-runtime.js:150:3
W20170119-11:54:06.218(2)? (STDERR)     at C:\Users\Alex\Meteor\leaderboard\.met
eor\local\build\programs\server\boot.js:295:34
W20170119-11:54:06.219(2)? (STDERR)     at Array.forEach (native)
W20170119-11:54:06.220(2)? (STDERR)     at Function._.each._.forEach (C:\Users\A
lex\AppData\Local\.meteor\packages\meteor-tool\1.4.2_3\mt-os.windows.x86_32\dev_
bundle\server-lib\node_modules\underscore\underscore.js:79:11)
W20170119-11:54:06.221(2)? (STDERR)     at C:\Users\Alex\Meteor\leaderboard\.met
eor\local\build\programs\server\boot.js:128:5
W20170119-11:54:06.223(2)? (STDERR)     at C:\Users\Alex\Meteor\leaderboard\.met
eor\local\build\programs\server\boot.js:344:5
=> Exited with code: 1
W20170119-11:54:08.174(2)? (STDERR) C:\Users\Alex\Meteor\leaderboard\.meteor\loc
al\build\programs\server\boot.js:348
W20170119-11:54:08.175(2)? (STDERR) }).run();
W20170119-11:54:08.176(2)? (STDERR)    ^
W20170119-11:54:08.177(2)? (STDERR)
W20170119-11:54:08.177(2)? (STDERR) Error: The babel-runtime npm package could n
ot be found in your node_modules
W20170119-11:54:08.178(2)? (STDERR) directory. Please run the following command
to install it:
W20170119-11:54:08.179(2)? (STDERR)
W20170119-11:54:08.181(2)? (STDERR)   meteor npm install --save babel-runtime
W20170119-11:54:08.182(2)? (STDERR)
W20170119-11:54:08.183(2)? (STDERR)     at meteorInstall.node_modules.meteor.bab
el-runtime.babel-runtime.js (packages\babel-runtime.js:37:9)
W20170119-11:54:08.184(2)? (STDERR)     at fileEvaluate (packages\modules-runtim
e.js:181:9)
W20170119-11:54:08.185(2)? (STDERR)     at require (packages\modules-runtime.js:
106:16)
W20170119-11:54:08.186(2)? (STDERR)     at packages\babel-runtime.js:139:15
W20170119-11:54:08.187(2)? (STDERR)     at packages\babel-runtime.js:150:3
W20170119-11:54:08.188(2)? (STDERR)     at C:\Users\Alex\Meteor\leaderboard\.met
eor\local\build\programs\server\boot.js:295:34
W20170119-11:54:08.189(2)? (STDERR)     at Array.forEach (native)
W20170119-11:54:08.191(2)? (STDERR)     at Function._.each._.forEach (C:\Users\A
lex\AppData\Local\.meteor\packages\meteor-tool\1.4.2_3\mt-os.windows.x86_32\dev_
bundle\server-lib\node_modules\underscore\underscore.js:79:11)
W20170119-11:54:08.192(2)? (STDERR)     at C:\Users\Alex\Meteor\leaderboard\.met
eor\local\build\programs\server\boot.js:128:5
W20170119-11:54:08.193(2)? (STDERR)     at C:\Users\Alex\Meteor\leaderboard\.met
eor\local\build\programs\server\boot.js:344:5
=> Exited with code: 1
=> Your application is crashing. Waiting for file change.

任何想法有什么问题吗?就像我说的,这是新安装的..

【问题讨论】:

  • 那么当您运行错误消息中建议的命令时会发生什么?
  • 尝试在另一个端口上运行项目 meteor run --port 3030

标签: javascript mongodb meteor


【解决方案1】:

如果您查看package.json 文件,您会看到:

"dependencies": { "meteor-node-stubs": "~0.2.0", "babel-runtime": "6.18.0" }

在创建排行榜应用程序后,您可能错过了终端中的指令,该指令说运行meteor npm install - 在meteor run 之前运行它,将安装依赖项,您可以启动排行榜应用程序。

https://guide.meteor.com/using-npm-packages.html

【讨论】:

    【解决方案2】:

    尝试在你的 cmd 中输入这个:

    meteor npm install --save babel-runtime
    

    正如您的错误中所建议的那样。

    如果它返回类似:

    致命错误:git 未安装或不在 PATH 中

    继续从git.com 下载 GIT,然后重新启动你的 cmd 并运行你的命令......应该没问题,因为它对我有用

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-10-26
      • 2014-12-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-24
      • 1970-01-01
      相关资源
      最近更新 更多