当前位置: 动力学知识库 > 问答 > 编程问答 >

node.js - Unable to generate meanjs using yeoman generator

问题描述:

I am trying to generate Meanjs with yo meanjs command,

. Installed the generator generator-meanjs.

But when I tried to install meanjs I am getting below error. Please suggest on what to do.

 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)

below is the setup:

$ node -v

v4.1.1

$ npm --v

2.14.3

$ yo --version

1.4.8

Please Suggest..

网友答案:

Check it out https://github.com/meanjs/generator-meanjs/issues/117

Hope It will help!

Try this thing with lower version of Node (0.12.7)

网友答案:

It looks like you have node 4.1.1 installed. The Yeoman generator does not support that version of Node as yet, as it did not support io.js.

If you still want to use meanjs you will have to downgrade your version of node to 0.12.x

分享给朋友:
您可能感兴趣的文章:
随机阅读: