當我嘗試在Visual Studio 2015 Preview中構建apache cordova應用程序時,遇到以下錯誤。Visual Studio 2015預覽 - Apache Cordova構建錯誤
npm install error : error : spawn ENOENT
但在命令提示符窗口,如果我使用
npm -v
其返回
2.1.9
但當視覺工作室嘗試安裝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 [email protected]: wanted: {"node":">=0.6","npm":"1"} (current: {"node":
"0.10.33","npm":"2.1.9"})
npm WARN engine [email protected]: 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
[email protected] C:\usr\local\node_modules\vs-mda
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], forever-agent
@0.5.2, [email protected], [email protected], [email protected], [email protected], [email protected]
1, [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], acc
[email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], cordova-li
[email protected], [email protected])
我不知道爲什麼VS-CLI在尋找錯誤的目錄中。
C:\usr\local\vs-cli
但故宮實際安裝在以下目錄
C:\Program Files\nodejs\node_modules\npm
任何人都幫我在這。
謝謝
爲了幫助更好地診斷此問題,瞭解您之前是否已安裝CTP2.0以在VS 2013 Update 3中構建Cordova應用程序會很有幫助? – Ellen 2014-11-25 00:39:58
@Ellen。我以前沒有安裝CTP 2.0。但我多次重新安裝了視覺工作室。我仍然無法安裝npm。 – Gowtham 2014-11-25 00:51:12