2014-06-09 66 views
0

我需要在Mac上安裝隕石。我正在嘗試安裝隕石,如下所示。隕石mrt命令不能在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 

> [email protected] postinstall /usr/local/lib/node_modules/meteorite 
> sh ./completions/postinstall.sh 

[email protected] /usr/local/lib/node_modules/meteorite 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] ([email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected]) 
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) 

之後:

HOMEs-Mac-mini:~ home$ meteor create appdemo 
appdemo: created. 

To run your new app: 
    cd appdemo 
    meteor 
HOMEs-Mac-mini:~ home$ cd appdemo 

添加以下套餐使用地鐵:

HOMEs-Mac-mini:appdemo home$ mrt add router 

這裏地鐵不工作得到錯誤,如下圖所示:

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$ 

我沒有得到有關this.Can請你建議我做什麼什麼想法?

+0

什麼版本的隕石? – JakeGould

+0

根據這個答案在這裏它似乎可能是隕石和流星之間的版本不匹配:http://stackoverflow.com/a/23473434/117259 – JakeGould

+0

如何知道隕石版本?。我使用幫助文檔作爲github。@ JakeGould – user3666257

回答

0

我曾經有一個設置,我的開發人員帳戶沒有管理員角色。聽起來像一個安全的設置,但我只遇到問題與npm & sudo。

一個臨時解決方案是擁有一個單獨的管理員帳戶,並使用此帳戶運行所有npm install s,但如果安裝了很多軟件包,那真的很糟糕。

經過一段時間後,我終於卸載npm,升級我的帳戶與管理員權限,並重新安裝npm。從那以後沒有問題。