2015-09-25 77 views
0

我正在嘗試使用yo meanjs命令生成Meanjs, 。安裝了generator generator-meanjs。 但是,當我試圖安裝meanjs我得到以下錯誤。請建議做什麼。無法使用yeoman生成器生成meanjs

Unhandled rejection Error: Command failed: C:\Windows\system32\cmd.exe /s /c "cd mean && npm install" 

    npm WARN engine [email protected]: wanted: {"node":">=0.8 <=0.12 || >=1 <=2"} (current: {"node":"4.1.1","npm":"3.3.3"}) 

    npm WARN engine [email protected]: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"4.1.1","npm":"3.3.3"}) 

    npm WARN install Couldn't install optional dependency: Unsupported 

    npm WARN install Couldn't install optional dependency: Unsupported 

    npm WARN prefer global [email protected] should be installed with -g 

    npm WARN prefer global [email protected] should be installed with -g 

    npm WARN prefer global [email protected] should be installed with -g 
    gyp ERR! build error 

    gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` failed with exit code: 1 

      gyp ERR! stack  at ChildProcess.onExit (C:\Users\LENOVO\AppData\Roaming\npm\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 Windows_NT 6.1.7601 

      gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\LENOVO\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" 


      gyp ERR! cwd C:\MEANProject\mean\node_modules\selenium-webdriver\node_modules\bu fferutil 
    gyp ERR! node -v v4.1.1 
    gyp ERR! node-gyp -v v3.0.1 
    gyp ERR! not ok 
    npm WARN EPACKAGEJSON [email protected] No repository field. 
    npm ERR! Windows_NT 6.1.7601 
    npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\LENOVO\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" 
    npm ERR! node v4.1.1 
    npm ERR! npm v3.3.3 
    npm ERR! code ELIFECYCLE 

    npm ERR! [email protected] install: `node-gyp rebuild` 
    npm ERR! Exit status 1 
    npm ERR! 
    npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'. 
    npm ERR! This is most likely a problem with the bufferutil package, 
    npm ERR! not with npm itself. 
    npm ERR! Tell the author that this fails on your system: 
    npm ERR!  node-gyp rebuild 
    npm ERR! You can get their info via: 
    npm ERR!  npm owner ls bufferutil 
    npm ERR! There is likely additional logging output above. 

    npm ERR! Please include the following file with any support request: 
    npm ERR!  C:\MEANProject\mean\npm-debug.log 

at ChildProcess.exithandler (child_process.js:203:12) 
at emitTwo (events.js:87:13) 
at ChildProcess.emit (events.js:172:7) 
at maybeClose (internal/child_process.js:817:16) 
at Socket.<anonymous> (internal/child_process.js:319:11) 
at emitOne (events.js:77:13) 
at Socket.emit (events.js:169:7) 
at Pipe._onclose (net.js:469:12) 
下面

是設置:

$ node -v 
v4.1.1 
$ npm --v 
2.14.3 
$ yo --version 
1.4.8 

請推薦..

+0

什麼使用的命令? –

+0

@ Michelem $ yo meanjs – See

回答

0

看起來你有節點4.1.1安裝。 Yeoman生成器不支持該版本的Node,因爲它不支持io.js.

如果你仍然想使用meanjs你將不得不降級節點的版本0.12.x

+0

看起來像現在meanjs支持節點4.x –

相關問題