Search code examples
node.jsvisual-studio-2015npmapache-cordova

Apache cordova visual studio 2015 app is not working


I am using visual studio 2015 , my OS is windows 8. When i tried to run my first Apache Cordova app in visual studio i get the following error. I saw some solution and cleaned Cordova cache in Cordova tool in options but i dint works shows same error. So i am showing same below please help me to solve the error. enter code here build outputs-

   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 this is same problem i explained in github.i also attached 2 file you can reffer the error log files and errors .


Solution

  • I execute the following commands and it is worked for me:

    npm config set strict-ssl false
    npm config set registry "http://registry.npmjs.org/"
    npm --proxy http://user:password@proxy:8080 install
    

    Thank You