安装meteor运行基本demo发生错误。

bogon:~ paul$ curl https://install.meteor.com/ | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7786    0  7786    0     0   5938      0 --:--:--  0:00:01 --:--:--  5938
Downloading Meteor distribution
######################################################################## 100.0%

Meteor 1.4.2.3 has been installed in your home directory (~/.meteor).
Writing a launcher script to /usr/local/bin/meteor for your convenience.

To get started fast:

  $ meteor create ~/my_cool_app
  $ cd ~/my_cool_app
  $ meteor

Or see the docs at:

  docs.meteor.com

bogon:~ paul$ meteor create demo1
Created a new Meteor app in 'demo1'.

To run your new app:
  cd demo1
  meteor npm install
  meteor

If you are new to Meteor, try some of the learning resources here:
  https://www.meteor.com/learn

meteor create --bare to create an empty app.
meteor create --full to create a scaffolded app.

bogon:~ paul$ cd demo1
bogon:demo1 paul$ meteor
[[[[[ ~/demo1 ]]]]]

=> Started proxy.
=> Started MongoDB.
W20170131-08:51:58.282(8)? (STDERR) /Users/paul/demo1/.meteor/local/build/programs/server/boot.js:348
W20170131-08:51:58.345(8)? (STDERR) }).run();
W20170131-08:51:58.345(8)? (STDERR)    ^
W20170131-08:51:58.346(8)? (STDERR)
W20170131-08:51:58.346(8)? (STDERR) Error: The babel-runtime npm package could not be found in your node_modules
W20170131-08:51:58.346(8)? (STDERR) directory. Please run the following command to install it:
W20170131-08:51:58.347(8)? (STDERR)
W20170131-08:51:58.347(8)? (STDERR)   meteor npm install --save babel-runtime
W20170131-08:51:58.348(8)? (STDERR)
W20170131-08:51:58.348(8)? (STDERR)     at meteorInstall.node_modules.meteor.babel-runtime.babel-runtime.js (packages/babel-runtime.js:37:9)
W20170131-08:51:58.349(8)? (STDERR)     at fileEvaluate (packages/modules-runtime.js:181:9)
W20170131-08:51:58.349(8)? (STDERR)     at require (packages/modules-runtime.js:106:16)
W20170131-08:51:58.349(8)? (STDERR)     at packages/babel-runtime.js:139:15
W20170131-08:51:58.350(8)? (STDERR)     at packages/babel-runtime.js:150:3
W20170131-08:51:58.350(8)? (STDERR)     at /Users/paul/demo1/.meteor/local/build/programs/server/boot.js:295:34
W20170131-08:51:58.350(8)? (STDERR)     at Array.forEach (native)
W20170131-08:51:58.351(8)? (STDERR)     at Function._.each._.forEach (/Users/paul/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20170131-08:51:58.351(8)? (STDERR)     at /Users/paul/demo1/.meteor/local/build/programs/server/boot.js:128:5
W20170131-08:51:58.352(8)? (STDERR)     at /Users/paul/demo1/.meteor/local/build/programs/server/boot.js:344:5
=> Exited with code: 1
W20170131-08:51:59.357(8)? (STDERR) /Users/paul/demo1/.meteor/local/build/programs/server/boot.js:348
W20170131-08:51:59.358(8)? (STDERR) }).run();
W20170131-08:51:59.358(8)? (STDERR)    ^
W20170131-08:51:59.358(8)? (STDERR)
W20170131-08:51:59.359(8)? (STDERR) Error: The babel-runtime npm package could not be found in your node_modules
W20170131-08:51:59.359(8)? (STDERR) directory. Please run the following command to install it:
W20170131-08:51:59.360(8)? (STDERR)
W20170131-08:51:59.360(8)? (STDERR)   meteor npm install --save babel-runtime
W20170131-08:51:59.361(8)? (STDERR)
W20170131-08:51:59.362(8)? (STDERR)     at meteorInstall.node_modules.meteor.babel-runtime.babel-runtime.js (packages/babel-runtime.js:37:9)
W20170131-08:51:59.362(8)? (STDERR)     at fileEvaluate (packages/modules-runtime.js:181:9)
W20170131-08:51:59.362(8)? (STDERR)     at require (packages/modules-runtime.js:106:16)
W20170131-08:51:59.363(8)? (STDERR)     at packages/babel-runtime.js:139:15
W20170131-08:51:59.363(8)? (STDERR)     at packages/babel-runtime.js:150:3
W20170131-08:51:59.364(8)? (STDERR)     at /Users/paul/demo1/.meteor/local/build/programs/server/boot.js:295:34
W20170131-08:51:59.364(8)? (STDERR)     at Array.forEach (native)
W20170131-08:51:59.364(8)? (STDERR)     at Function._.each._.forEach (/Users/paul/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20170131-08:51:59.365(8)? (STDERR)     at /Users/paul/demo1/.meteor/local/build/programs/server/boot.js:128:5
W20170131-08:51:59.365(8)? (STDERR)     at /Users/paul/demo1/.meteor/local/build/programs/server/boot.js:344:5
=> Exited with code: 1
W20170131-08:52:00.369(8)? (STDERR) /Users/paul/demo1/.meteor/local/build/programs/server/boot.js:348
W20170131-08:52:00.370(8)? (STDERR) }).run();
W20170131-08:52:00.370(8)? (STDERR)    ^
W20170131-08:52:00.370(8)? (STDERR)
W20170131-08:52:00.370(8)? (STDERR) Error: The babel-runtime npm package could not be found in your node_modules
W20170131-08:52:00.370(8)? (STDERR) directory. Please run the following command to install it:
W20170131-08:52:00.371(8)? (STDERR)
W20170131-08:52:00.371(8)? (STDERR)   meteor npm install --save babel-runtime
W20170131-08:52:00.371(8)? (STDERR)
W20170131-08:52:00.371(8)? (STDERR)     at meteorInstall.node_modules.meteor.babel-runtime.babel-runtime.js (packages/babel-runtime.js:37:9)
W20170131-08:52:00.371(8)? (STDERR)     at fileEvaluate (packages/modules-runtime.js:181:9)
W20170131-08:52:00.372(8)? (STDERR)     at require (packages/modules-runtime.js:106:16)
W20170131-08:52:00.372(8)? (STDERR)     at packages/babel-runtime.js:139:15
W20170131-08:52:00.372(8)? (STDERR)     at packages/babel-runtime.js:150:3
W20170131-08:52:00.373(8)? (STDERR)     at /Users/paul/demo1/.meteor/local/build/programs/server/boot.js:295:34
W20170131-08:52:00.373(8)? (STDERR)     at Array.forEach (native)
W20170131-08:52:00.374(8)? (STDERR)     at Function._.each._.forEach (/Users/paul/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20170131-08:52:00.374(8)? (STDERR)     at /Users/paul/demo1/.meteor/local/build/programs/server/boot.js:128:5
W20170131-08:52:00.374(8)? (STDERR)     at /Users/paul/demo1/.meteor/local/build/programs/server/boot.js:344:5
=> Exited with code: 1
=> Your application is crashing. Waiting for file change.

求教啊。

阅读 4.8k
4 个回答

截图的第三行

To run your new app:
cd demo1
meteor npm install
meteor
少了一步,原谅新手吧……

写个 run.sh 这样来启动,指定 ROOT_URL,因为程序里经常用到 Meteor.absoluteUrl 这个 api,另外不用内置的 mongo:

#!/bin/bash

ROOT_URL=http://[ip地址]:[端口] MONGO_URL=mongodb://localhost:27017/db_name meteor run --port=[端口]

缺少包管理工具.....

$ meteor npm install
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题