【问题标题】:Unable to generate meanjs using yeoman generator无法使用 yeoman 生成器生成 meanjs
【发布时间】:2015-09-30 07:08:10
【问题描述】:

我正在尝试使用 yo meanjs 命令生成 Meanjs, .安装了生成器 generator-meanjs。 但是当我尝试安装meanjs时,我遇到了错误。请提出建议。

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

    npm WARN engine karma@0.12.37: wanted: {"node":">=0.8 <=0.12 || >=1 <=2"} (current: {"node":"4.1.1","npm":"3.3.3"})

    npm WARN engine xmlbuilder@2.2.1: 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 jshint@2.8.0 should be installed with -g

    npm WARN prefer global node-gyp@3.0.3 should be installed with -g

    npm WARN prefer global nodemon@1.3.8 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 mean@0.0.0 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! bufferutil@1.1.0 install: `node-gyp rebuild`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the bufferutil@1.1.0 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

请推荐..

【问题讨论】:

  • 你使用的命令是什么?
  • @Michelem $ yo meanjs

标签: node.js msbuild


【解决方案1】:

检查一下 https://github.com/meanjs/generator-meanjs/issues/117

希望对您有所帮助!

用较低版本的 Node (0.12.7) 试试这个东西

【讨论】:

    【解决方案2】:

    看起来您已经安装了节点 4.1.1。 Yeoman 生成器尚不支持该版本的 Node,因为它不支持 io.js。

    如果你仍然想使用 meanjs,你必须将你的 node 版本降级到 0.12.x

    【讨论】:

    • 现在看来 meanjs 确实支持 node 4.x
    猜你喜欢
    • 2015-12-29
    • 2023-03-22
    • 2015-01-07
    • 2014-12-31
    • 2015-09-26
    • 2015-04-15
    • 1970-01-01
    • 1970-01-01
    • 2015-01-15
    相关资源
    最近更新 更多