npm install error : error : spawn ENOENT
但是在命令提示符中,如果我使用以下命令:
npm -v
它正在返回
2.1.9
但是当使用Visual Studio安装npm时,我遇到了错误。
有人可以帮我吗?
谢谢。
大家好,
按照Ellen的步骤完成后,Visual Studio报告了新的错误信息。
1>Task "MdaVsCli" (TaskId:17)
1> Task Parameter:VsCliPath= C:\Users\MyName\AppData\Roaming\npm\node_modules\vs-mda\vs-cli.cmd (TaskId:17)
1> Task Parameter:Platform=Android (TaskId:17)
1> Task Parameter:ProjectDir=. (TaskId:17)
1> Task Parameter:Configuration=Debug (TaskId:17)
1> Task Parameter:ProjectName=BlankCordovaApp21 (TaskId:17)
1> Task Parameter:Language=en-US (TaskId:17)
1> Task Parameter:BuildTarget=RippleNexus (TaskId:17)
1> The system cannot find the path specified. (TaskId:17)
1>Done executing task "MdaVsCli" -- FAILED. (TaskId:17)
我安装npm后,以下是显示的消息。
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\xxl33
z1o.sqb\packages\vs-mda>npm -g install
npm WARN engine npm@1.3.4: wanted: {"node":">=0.6","npm":"1"} (current: {"node":
"0.10.33","npm":"2.1.9"})
npm WARN engine npm@1.3.4: wanted: {"node":">=0.6","npm":"1"} (current: {"node":
"0.10.33","npm":"2.1.9"})
C:\usr\local\vs-cli -> C:\usr\local\node_modules\vs-mda\vs-cli.cmd
vs-mda@0.1.70 C:\usr\local\node_modules\vs-mda
├── rimraf@2.2.6
├── ncp@0.5.1
├── q@1.0.1
├── mkdirp@0.3.5
├── adm-zip@0.4.4
├── optimist@0.6.1 (wordwrap@0.0.2, minimist@0.0.10)
├── fstream@0.1.28 (inherits@2.0.1, graceful-fs@3.0.4)
├── tar@0.1.20 (inherits@2.0.1, block-stream@0.0.7)
├── elementtree@0.1.6 (sax@0.3.5)
├── request@2.36.0 (json-stringify-safe@5.0.0, tunnel-agent@0.4.0, forever-agent
@0.5.2, qs@0.6.6, aws-sign2@0.5.0, oauth-sign@0.3.0, mime@1.2.11, node-uuid@1.4.
1, tough-cookie@0.12.1, form-data@0.1.4, hawk@1.0.0, http-signature@0.10.0)
├── ripple-emulator@0.9.24 (connect-xcors@0.5.2, colors@0.6.0-1, open@0.0.3, acc
ounting@0.4.1, request@2.12.0, moment@1.7.2, express@3.1.0)
├── cordova@4.0.0 (q@0.9.7, underscore@1.4.4, nopt@2.2.1, cordova-lib@4.0.0)
└── plugman@0.22.4 (q@0.9.7, underscore@1.4.4, nopt@1.0.10, rc@0.3.0, cordova-li
b@0.21.6, npm@1.3.4)
我不知道为什么vs-cli会搜索错误的目录。
C:\usr\local\vs-cli
但是实际上npm被安装在以下目录中。
C:\Program Files\nodejs\node_modules\npm
有人能帮我解决这个问题吗?
谢谢。