每次我尝试通过在命令行中输入“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)
答案 0 :(得分: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
现在
如果没有,则其中任何一个都是真的:
brunch
二进制文件的路径; 就我而言,brunch
二进制文件已安装为/usr/local/bin/brunch
。对你来说可能有所不同,因为我正在使用N。我强烈建议你也使用它来避免任何权限问题,并能够切换节点版本。
您可能想尝试将N设置为N并再次使用N - 也许问题会消失,那就是它。