我需要在Mac上安装陨石。我正在尝试安装陨石,如下所示。
HOMEs-Mac-mini:~ home$ npm -v
1.4.9
HOMEs-Mac-mini:~ home$ node -v
v0.10.28
然后:
HOMEs-Mac-mini:~ home$ sudo -H npm install -g meteorite
结果是:
npm http GET https://registry.npmjs.org/meteorite
npm http 304 https://registry.npmjs.org/meteorite
npm http GET https://registry.npmjs.org/ddp
npm http GET https://registry.npmjs.org/wrench
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/fstream
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/prompt
npm http GET https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/rolling_timeout_exec
npm http 304 https://registry.npmjs.org/wrench
npm http 304 https://registry.npmjs.org/fstream
npm http 304 https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/ddp
npm http 304 https://registry.npmjs.org/prompt
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/colors
npm http 304 https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/rolling_timeout_exec
npm http GET https://registry.npmjs.org/node-srp
npm http GET https://registry.npmjs.org/meteor-ejson
npm http GET https://registry.npmjs.org/faye-websocket
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/minimist
npm http GET https://registry.npmjs.org/pkginfo
npm http GET https://registry.npmjs.org/read
npm http GET https://registry.npmjs.org/revalidator
npm http GET https://registry.npmjs.org/winston
npm http GET https://registry.npmjs.org/utile
npm http 304 https://registry.npmjs.org/faye-websocket
npm http 304 https://registry.npmjs.org/node-srp
npm http 304 https://registry.npmjs.org/meteor-ejson
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/websocket-driver
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/pkginfo
npm http 304 https://registry.npmjs.org/minimist
npm http 304 https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/read
npm http 304 https://registry.npmjs.org/revalidator
npm http 304 https://registry.npmjs.org/websocket-driver
npm http 304 https://registry.npmjs.org/utile
npm http 304 https://registry.npmjs.org/winston
npm http GET https://registry.npmjs.org/mute-stream
npm http GET https://registry.npmjs.org/deep-equal
npm http GET https://registry.npmjs.org/i
npm http GET https://registry.npmjs.org/ncp
npm http GET https://registry.npmjs.org/cycle
npm http GET https://registry.npmjs.org/eyes
npm http GET https://registry.npmjs.org/stack-trace
npm http GET https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/i
npm http 304 https://registry.npmjs.org/deep-equal
npm http 304 https://registry.npmjs.org/ncp
npm http 304 https://registry.npmjs.org/cycle
npm http 304 https://registry.npmjs.org/mute-stream
npm http 304 https://registry.npmjs.org/stack-trace
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/eyes
/usr/local/bin/mrt -> /usr/local/lib/node_modules/meteorite/bin/mrt.js
> meteorite@0.7.4 postinstall /usr/local/lib/node_modules/meteorite
> sh ./completions/postinstall.sh
meteorite@0.7.4 /usr/local/lib/node_modules/meteorite
├── rolling_timeout_exec@0.0.1
├── colors@0.6.0-1
├── wrench@1.3.9
├── async@0.2.9
├── underscore@1.3.3
├── fstream@0.1.25 (inherits@2.0.1, graceful-fs@2.0.3, rimraf@2.2.8, mkdirp@0.3.5)
├── optimist@0.6.1 (wordwrap@0.0.2, minimist@0.0.10)
├── ddp@0.4.6 (meteor-ejson@0.6.3, node-srp@0.0.1, faye-websocket@0.7.2)
└── prompt@0.2.11 (revalidator@0.1.8, pkginfo@0.3.0, read@1.0.5, utile@0.2.1, winston@0.6.2)
之后:
HOMEs-Mac-mini:~ home$ meteor create appdemo
appdemo: created.
To run your new app:
cd appdemo
meteor
HOMEs-Mac-mini:~ home$ cd appdemo
使用下面的mrt添加包:
HOMEs-Mac-mini:appdemo home$ mrt add router
这里mrt不工作会出现错误,如下所示:
Stand back while Meteorite does its thing
✓ router
tag: https://github.com/tmeasday/meteor-router.git#v0.6.1
ERROR: 128 Command failed: fatal: Not a git repository (or any of the parent directories): .git
STDOUT:
STDERR: fatal: Not a git repository (or any of the parent directories): .git
/usr/local/lib/node_modules/meteorite/lib/sources/git.js:181
self.checkoutType + ": " + (self.commit || self.head);
^
There was a problem checking out tag: v0.6.1
HOMEs-Mac-mini:appdemo home$
我对此没有任何想法。你能建议我做什么吗?。
答案 0 :(得分:0)
我曾经有一个设置,我的开发者帐户没有管理员角色。听起来像一个安全的设置,但我只遇到了与npm和amp;须藤。
临时解决方案是拥有一个单独的管理员帐户并使用此帐户运行所有npm install
,但如果您安装了大量软件包,这真的很糟糕。
在搞砸了一段时间后我终于卸载了npm,用管理员权限升级了我的帐户并重新安装了npm。从那时起没有问题。