0
votes

vs-tac module is installed in the "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\Packages\vs-tac" but as you see from the error below, it is expected in the project's node_module.

enter image description here enter image description here

If I copy vs-tac module into the project's node_modules, I get the error Path is too long since there is a deep node_modules in vs-tac. If I ignore node_modules and copy the rest of vs-tac, I get the following error;

enter image description here enter image description here

Is vs-tac supposed to stored in "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\Packages\vs-tac" or project node_modules or both. If so why is my vs-tac does not exists in project node_modules?

I have also tried Clearing Cordova Cache and my External Web Tools looks like the image below;

enter image description here

1

1 Answers

2
votes

I have found a way to overcome this problem but the reason behind why I should hack it and install vs-tac in my project's node_modules by myself still unclear for me.

I have copied everything in vs-tac folder but vs-tac\node_modules from this path:

"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\Packages\vs-tac"

Into the ProjectFolder\node_modules\vs-tac folder of my project and then execute the command within ProjectFolder\node_modules\vs-tac :

npm install

Which created the necessary files and packages in node_modules\vs-tac\node_modules

I have closed visual studio and opened my project again just in case and then build the project. The problem was gone.

There are tones of similar solutions but none of them helped me since the key points was missing or I was overseeing it;

  1. Copy the vs-tac without node_modules folder to prevent "path is too long" error or any other compliance problems
  2. Execute npm install in the vs-tac folder not in the ProjectFolder\node_modules but in the ProjectFolder\node_modules\vs-tac\

I hope, it helps you too