2014-10-12 71 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 - 也许问题将消失,那就是它。