Wednesday, April 4, 2018

Package downloading problems - Apache Cordova Tools Visual Studio 2015 - "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\packages\vs-tac"

Previous blog post.

https://guntucomputerhacks.blogspot.com.au/2018/04/current-package-installation-is.html



Hi According to bellow post I had to repair vs-tac package in my Cordova Tools for Visual Studio 2015.

But when visual studio was trying to download the package by itself it's giving connection error when connecting npm severs.

You'll see something like this.

request to http://registry.npmjs.org/optimist failed, reason: connect ECONNREFUSED 127.0.0.1:8888


So now lets see the solution.

Solution 1

1. Add C:\Windows\System32 to user's environment variable under "path"  collection.
2. Restart your computer.
3. Uninstall Node JS and install the latest stable version of Node JS.'
4. Go to Tools --> Options --> Tools for Apache Cordova --> Cordova Tools --> Clear Cordova Cache and try to build your project.


If you are able to build your project and deploy the you'll be ok. But if you still getting  following errors then proceed to solution 2.

Error 1 - Current package installation is corrupted. Will cleanup and do a fresh installation. 
Error 2 -  Request to http://registry.npmjs.org/optimist failed, reason: connect ECONNREFUSED 127.0.0.1:8888

Solution 2

1. Open command prompt as administrator.
2. Enter following command. This is to install package manually.

C:\WINDOWS\system32>npm install -g "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\APACHECORDOVATOOLS\packages\vs-tac"


If you are successful that means your visual studio 2015 has some problems. You may try run visual studio as Administrator or Repair your visual studio. If you see following error that means you have some problems with NPM network configuration settings or you are not connected to internet.

* Please check your firewall settings before proceed.




Lets follow bellow steps to fix any configuration issues in NPM.

1.  Open C:\Users\\.npmrc file and remove highlighted line if you have proxy.



2. Check the registry URL as well.  Also you can use command line to reset these URLs 



3.  Try running command in step 2. 


Hope this helps.




No comments:

Post a Comment