全局安装早午餐时出现错误信息

每次我尝试通过在命令行中input“npm install -g brunch”来安装早午餐时,我收到以下错误消息:

> fsevents@0.3.0 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 brunch@1.7.17 /usr/local/share/npm/lib/node_modules/brunch ├── debug@0.7.4 ├── async-waterfall@0.1.5 ├── async-each@0.1.4 ├── commonjs-require-definition@0.1.2 ├── commander@2.0.0 ├── ncp@0.4.2 ├── mkdirp@0.3.5 ├── init-skeleton@0.2.4 (rimraf@2.2.8) ├── loggy@0.2.0 (growl@1.7.0, ansi-color@0.2.1, date-utils@1.2.16) ├── source-map@0.1.40 (amdefine@0.1.0) ├── coffee-script@1.8.0 ├── anysort@0.2.0 (anymatch@0.2.0) ├── read-components@0.6.1 (component-builder@0.10.1) ├── pushserve@0.1.6 (connect-slashes@0.0.11, express@3.3.8) └── chokidar@0.9.0 (recursive-readdir@0.0.2, fsevents@0.3.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二进制文件的path;
  • 我错了,由于某种原因没有安装。

在我的情况下, brunch二进制文件被安装为/usr/local/bin/brunch 。 对你来说可能会有所不同,因为我在使用N。 我强烈build议你也使用它,以避免任何权限问题,并能够切换节点版本。

你可能想尝试设置N,然后用N再试一次,也许问题就会消失,就是这样。