2015-11-09 198 views
0

我最近从iojs切换回节点,最后得到了安装来为node和npm工作,但现在无法让我的项目的dev依赖加载。 npm安装产生以下...npm install给出node-gyp错误

> [email protected] install /Users/ernest son/Desktop/PROJECTS/musicomp/node_modules/bufferutil 
> node-gyp rebuild 

CXX(target) Release/obj.target/bufferutil/src/bufferutil.o 
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/include/node' 
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/src' 
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/deps/uv/include' 
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/deps/v8/include' 
make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 1 
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2 
gyp ERR! stack  at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23) 
gyp ERR! stack  at emitTwo (events.js:87:13) 
gyp ERR! stack  at ChildProcess.emit (events.js:172:7) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) 
gyp ERR! System Darwin 14.5.0 
gyp ERR! command "/usr/local/Cellar/node/5.0.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /Users/ernest son/Desktop/PROJECTS/musicomp/node_modules/bufferutil 
gyp ERR! node -v v5.0.0 
gyp ERR! node-gyp -v v3.0.3 
gyp ERR! not ok 
npm WARN install:[email protected] [email protected] install: `node-gyp rebuild` 
npm WARN install:[email protected] Exit status 1 

> [email protected] install /Users/ernest son/Desktop/PROJECTS/musicomp/node_modules/utf-8-validate 
> node-gyp rebuild 

    CXX(target) Release/obj.target/validation/src/validation.o 
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/include/node' 
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/src' 
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/deps/uv/include' 
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/deps/v8/include' 
make: *** [Release/obj.target/validation/src/validation.o] Error 1 
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2 
gyp ERR! stack  at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23) 
gyp ERR! stack  at emitTwo (events.js:87:13) 
gyp ERR! stack  at ChildProcess.emit (events.js:172:7) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) 
gyp ERR! System Darwin 14.5.0 
gyp ERR! command "/usr/local/Cellar/node/5.0.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /Users/ernest son/Desktop/PROJECTS/musicomp/node_modules/utf-8-validate 
gyp ERR! node -v v5.0.0 
gyp ERR! node-gyp -v v3.0.3 
gyp ERR! not ok 
npm WARN install:[email protected] [email protected] install: `node-gyp rebuild` 
npm WARN install:[email protected] Exit status 1 
[email protected] /Users/ernest son/Desktop/PROJECTS/musicomp 
├─┬ [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] 
│ │ └── [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] 

我试着删除$ HOME/.node-gyp并且还修复我的用户名中的空间。重新启动,但仍然遇到node-gyp的问题。谁能帮忙?谢谢

回答

0

问题的根源在于我的主文件夹中有一个空间。在这之后,所有事情都很顺利!