2016-07-22 101 views
0

我使用的是Visual Studio 2015,我的操作系統是Windows 8.當我嘗試在Visual Studio中運行我的第一個Apache科爾多瓦應用程序時,出現以下錯誤。我看到了一些解決方案,並在Cordova工具中清除了Cordova緩存中的選項,但我的作品顯示了相同的錯誤。所以我在下面顯示,請幫助我解決錯誤。 輸入代碼在這裏 建立輸出 -Apache科瓦多視覺工作室2015年應用程序不工作

1>------ Build started: Project: BlankCordovaApp1, Configuration: Debug Android ------ 
1> ------ Ensuring correct global installation of package from source package directory: E:\VISUAL STUDIO SETUP\COMMON7\IDE\EXTENSIONS\APACHECORDOVATOOLS\packages\vs-tac 
1> ------ Name from source package.json: vs-tac 
1> ------ Version from source package.json: 1.0.42 
1> ------ Package not currently installed globally. 
1> ------ Installing globally from source package. This could take a few minutes... 
1> Each package is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies. 
1> npm ERR! Windows_NT 6.2.9200 
1> npm ERR! argv "C:\\Users\\gopus\\AppData\\Roaming\\Microsoft\\VisualStudio\\MDA\\vs-npm\\2.14.9\\\\node.exe" "C:\\Users\\gopus\\AppData\\Roaming\\Microsoft\\VisualStudio\\MDA\\vs-npm\\2.14.9\\node_modules\\npm\\bin\\npm-cli.js" "-g" "install" "E:\\VISUAL STUDIO SETUP\\COMMON7\\IDE\\EXTENSIONS\\APACHECORDOVATOOLS\\packages\\vs-tac" "--loglevel" "warn" 
1> npm ERR! node v0.12.9 
1> npm ERR! npm v2.14.9 
1> npm ERR! code SELF_SIGNED_CERT_IN_CHAIN 
1> npm ERR! self signed certificate in certificate chain 
1> npm ERR! 
1>RUNMDAINSTALL : npm ERR! If you need help, you may report this error at: 
1> npm ERR!  <https://github.com/npm/npm/issues> 
1> npm ERR! Please include the following file with any support request: 
1> npm ERR!  C:\Users\gopus\AppData\Roaming\Microsoft\VisualStudio\MDA\vs-npm\2.14.9\npm-debug.log 
1> ------ npm install failed. Exit code: 1 
1> ------ Package installation failed. Retrying... 
1> npm WARN uninstall not installed in C:\Users\gopus\AppData\Roaming\npm\node_modules: "vs-tac" 
1> npm ERR! Windows_NT 6.2.9200 
1> npm ERR! argv "C:\\Users\\gopus\\AppData\\Roaming\\Microsoft\\VisualStudio\\MDA\\vs-npm\\2.14.9\\\\node.exe" "C:\\Users\\gopus\\AppData\\Roaming\\Microsoft\\VisualStudio\\MDA\\vs-npm\\2.14.9\\node_modules\\npm\\bin\\npm-cli.js" "-g" "install" "E:\\VISUAL STUDIO SETUP\\COMMON7\\IDE\\EXTENSIONS\\APACHECORDOVATOOLS\\packages\\vs-tac" "--loglevel" "warn" 
1> npm ERR! node v0.12.9 
1> npm ERR! npm v2.14.9 
1> npm ERR! code SELF_SIGNED_CERT_IN_CHAIN 
1> npm ERR! self signed certificate in certificate chain 
1> npm ERR! 
1>RUNMDAINSTALL : npm ERR! If you need help, you may report this error at: 
1> npm ERR!  <https://github.com/npm/npm/issues> 
1> npm ERR! Please include the following file with any support request: 
1> npm ERR!  C:\Users\gopus\AppData\Roaming\Microsoft\VisualStudio\MDA\vs-npm\2.14.9\npm-debug.log 
1> ------ npm install failed. Exit code: 1 
1> ------ Package installation failed. Retrying... 
1> npm WARN uninstall not installed in C:\Users\gopus\AppData\Roaming\npm\node_modules: "vs-tac" 
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(285,5): error : Error installing local npm package. 
1>MSBUILD : cordova-build error : module.js:338 
1> module.js:338 
1>MSBUILD : cordova-build error : throw err; 
1>  throw err; 
1>MSBUILD : cordova-build error :^
1>   ^
1>MSBUILD : cordova-build error BLD401: Error : BLD00401 : Could not find module 'C:\Users\gopus\AppData\Roaming\npm\node_modules\vs-tac\app.js'. Please Go to Tools --> Options --> Tools for Apache Cordova --> Cordova Tools --> Clear Cordova Cache and try building again. 
1> Error Cannot find module 'C:\Users\gopus\AppData\Roaming\npm\node_modules\vs-tac\app.js' 
1>MSBUILD : cordova-build error : at Function.Module._resolveFilename (module.js:336:15) 
1>  at Function.Module._resolveFilename (module.js:336:15) 
1>MSBUILD : cordova-build error : at Function.Module._load (module.js:278:25) 
1>  at Function.Module._load (module.js:278:25) 
1>MSBUILD : cordova-build error : at Function.Module.runMain (module.js:501:10) 
1>  at Function.Module.runMain (module.js:501:10) 
1>MSBUILD : cordova-build error : at startup (node.js:129:16) 
1>  at startup (node.js:129:16) 
1>MSBUILD : cordova-build error : at node.js:814:3 
1>  at node.js:814:3 
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== 
========== Deploy: 0 succeeded, 0 failed, 0 skipped ========== 
[enter link description here][1] 

https://github.com/npm/npm/issues/13475 這是我在github.i解釋同樣的問題還附上2文件,你可以reffer錯誤日誌文件和錯誤。

+0

PLZ幫我解決問題 –

+0

從錯誤信息,您使用的是系統代理,但npm沒有使用這個代理,所以它不能下載包。使用命令行工具嘗試重定向到文件夾'C:\ Users \ gopus \ AppData \ Roaming \ Microsoft \ VisualStudio \ MDA \ vs-npm \ 2.14.9'並鍵入'npm config set proxy http:// <您的系統代理> :'。 –

+0

C:\ Users \ gopus \ AppData \ Roaming \ Microsoft \ VisualStudio \ MDA \ vs-npm \ 2.14.9 npm config set proxy http://127.0.0.1:8080我在命令提示符下執行以下命令,然後運行我的項目visual studio但它顯示相同的錯誤 –

回答

0

我執行下面的命令,它是爲我工作:

npm config set strict-ssl false 
npm config set registry "http://registry.npmjs.org/" 
npm --proxy http://user:[email protected]:8080 install 

謝謝

相關問題