无法使用npm

时间:2015-09-01 19:28:36

标签: node.js npm ember-cli

我从Windows机器上完全卸载了节点,删除了所有相关节点和npm文件夹。

我重新安装了

  • node(v0.12.7)
  • npm(3.0.0)
  • python(2.7.10)

当我安装ember-cli时,我得到:

  

PS C:\ WINDOWS \ system32> npm install -g ember-cli

     

C:\ Program Files \ nodejs \ ember - > C:\ PROGRAM   文件\的NodeJS \ node_modules \余烬-CLI \ BIN \余烬

     
    

bufferutil@1.1.0安装C:\ Program Files \ nodejs \ node_modules \ ember-cli \ node_modules \ bufferutil     node-gyp rebuild

  
     

C:\程序   Files \ nodejs \ node_modules \ ember-cli \ node_modules \ bufferutil>如果没有   定义npm_config_node_gyp(节点“C:\ Program   文件\的NodeJS \ node_modules \故宫\ BIN \节点GYP斌\ .... \ node_modules \节点GYP \ BIN \节点gyp.js”   rebuild)else(节点重建)Die Projekte in dieser Projektmappe   werden nacheinander erstellt。 Um eine parallele Erstellung zu   ermöglichen,müssenSieden Schalter“/ m”hinzufügen。跟踪器:   Fehler TRK0005:Fehler beim Suchen von“CL.exe”。 Das System kann死了   angegebene Datei nicht finden。

     

C:\ Program Files   (86)\的MSBuild \ Microsoft.Cpp \ V4.0 \ V140 \ Microsoft.CppCommon.targets(355,5):   错误MSB6006:“CL.exe”wdd e mit dem Code 5 beendet。 [C:\ PROGRAM   文件\的NodeJS \ node_modules \烬-CLI \ node_modules \ bufferutil \编译\ bufferutil.vcxp   roj] gyp ERR!构建错误gyp ERR!堆栈错误:C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe失败,退出代码:1 gyp ERR!   在ChildProcess.onExit堆栈(C:\ Program   文件\的NodeJS \ node_modules \ NPM \ node_modules \节点-GYP \ lib中\ build.js:269:23)   gyp ERR!在ChildProcess.emit堆栈(events.js:110:17)gyp ERR!   在Process.ChildProcess._handle.onexit堆栈   (child_process.js:1074:12)gyp ERR!系统Windows_NT 6.3.9600 gyp   呃!命令“node”“C:\ Program   文件\的NodeJS \ node_modules \故宫\ node_modules \节点GYP \ BIN \节点gyp.js”   “重建”gyp ERR! cwd C:\ Program   Files \ nodejs \ node_modules \ ember-cli \ node_modules \ bufferutil gyp ERR!   node -v v0.12.7 gyp ERR! node-gyp -v v2.0.1 gyp ERR!不行C:\ Program   Files \nodejs└──(空)

     

npm ERR! Windows_NT 6.3.9600 npm ERR! argv“C:\ Program   Files \ nodejs \\ node.exe“”C:\ Program   Files \ nodejs \ node_modules \ npm \ bin \ npm-cli.js“”install“” - g“   “ember-cli”npm ERR!节点v0.12.7 npm ERR! npm v3.0.0 npm ERR!码   ELIFECYCLE

     

npm ERR! bufferutil@1.1.0安装:node-gyp rebuild npm ERR!出口   状态1 npm ERR!错误的ERR!在bufferutil@1.1.0安装失败   脚本'node-gyp rebuild'。错误的ERR!这很可能是一个问题   bufferutil包,npm ERR!不是与npm本身。错误的ERR!告诉   作者认为你的系统失败了:npm ERR!节点GYP   重建npm ERR!您可以通过以下方式获取他们的信息:npm ERR! npm所有者ls   bufferutil npm ERR!上面可能有额外的日志记录输出。

     

npm ERR!请在任何支持请求中包含以下文件:   错误的ERR! C:\ WINDOWS \ system32 \ npm-debug.log npm ERR!代码1 PS   C:\窗口\ system32>

所以,我认为这里的主要问题是CL.exe错误,但我不知道如何解决这个问题。

1 个答案:

答案 0 :(得分:1)

安装Visual Studio 2015 Community Edition并创建一个C ++项目以使用CL.exe安装dev环境。

https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx

https://stackoverflow.com/a/32584005/742226

相关问题