2014-10-12 64 views
2

每次我試圖通過在命令行中輸入「故宮安裝-g早午餐」安裝早午餐,我得到了以下錯誤消息:錯誤消息,當全球安裝的早午餐

> [email protected] install /usr/local/share/npm/lib/node_modules/brunch/node_modules/chokidar/node_modules/fsevents 
> node-gyp rebuild 

    CXX(target) Release/obj.target/fse/fsevents.o 


In file included from ../fsevents.cc:86: 
../src/constants.cc:10:66: warning: template argument uses unnamed type [-Wunnamed-type-template-args] 
    object->Set(NanNew<v8::String>("kFSEventStreamEventFlagNone"), NanNew<v8::Integer>(kFSEventStreamEvent... 

                   ^~~~~~ 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/FSEvents.h:290:1: note: 
     unnamed type used in template argument was declared here 
enum { 
^ 


1 warning generated. 

     SOLINK_MODULE(target) Release/fse.node 
     SOLINK_MODULE(target) Release/fse.node: Finished 
/usr/local/share/npm/bin/brunch -> /usr/local/share/npm/lib/node_modules/brunch/bin/brunch 
[email protected] /usr/local/share/npm/lib/node_modules/brunch 


├── [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]) 
└── [email protected] ([email protected], [email protected]) 
+0

這只是一個警告,而不是一個錯誤。 – Scimonster 2014-10-12 09:03:30

+0

我找不到源代碼(它在SO的某個地方),但是您可以通過更改npm權限來解決它 – xShirase 2014-10-12 09:06:01

+0

如何更改npm權限? – elenawalom 2014-10-12 16:38:53

回答

0

我也有這個打印時我做npm install -g brunch但它確實爲我安裝。

它似乎也會爲您安裝,因爲只有在成功安裝某些東西時,NPM纔會打印依賴關係樹。

運行brunch應該給你

Usage: brunch [command] [options] 

    Commands: 

    new [skeleton] [path] Create new brunch project in path [.]. Short-cut: n 
    build [options]  Build a brunch project. Short-cut: b 
    watch [options]  Watch brunch directory and rebuild if something changed. Short-cut: w 

    Options: 

    -h, --help  output usage information 
    -V, --version output the version number 

現在。

如果沒有,任何一個爲真:

  • 你的shell不知道的路徑,安裝brunch二進制;
  • 我錯了,因爲某些原因沒有安裝它。

在我的情況下,brunch二進制被安裝爲/usr/local/bin/brunch。它可能會因爲我使用N而有所不同。我強烈建議您也使用它以避免任何權限問題並能夠切換節點版本。

您可能想嘗試設置N,然後再次嘗試N - 也許問題將消失,那就是它。