Khi tôi cố gắng xây dựng ứng dụng apache cordova trong Visual Studio 2015 Preview Tôi gặp phải lỗi sau.Visual Studio 2015 xem trước - Lỗi Apache Cordova Build
npm install error : error : spawn ENOENT
Nhưng trong Command Prompt nếu tôi sử dụng
npm -v
nó trở
2.1.9
Nhưng khi visual studio cố gắng cài đặt NPM Tôi nhận lỗi.
Bất kỳ ai có thể giúp tôi về điều này không?
Cảm ơn.
Xin chào tất cả,
Sau khi thực hiện các bước được Ellen kể. Visual Studio báo cáo Thông báo lỗi mới
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)
Sau đây là thông báo sau khi tôi đã cài đặt 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].0, [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])
Tôi không biết tại sao vs-cli tìm trong thư mục sai.
C:\usr\local\vs-cli
Nhưng NPM thực sự được cài đặt trong thư mục sau
C:\Program Files\nodejs\node_modules\npm
Bất cứ ai giúp tôi về vấn đề này.
Cảm ơn
Để giúp chẩn đoán vấn đề này tốt hơn, sẽ hữu ích khi biết bạn đã cài đặt CTP2.0 trước đây để xây dựng ứng dụng Cordova trong VS 2013 Update 3 chưa? – Ellen
@Ellen. Tôi chưa cài đặt CTP 2.0 trước đây. Nhưng tôi đã cài đặt lại visual studio nhiều lần. Tôi vẫn không thể cài đặt npm. – Gowtham