Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2015 won't work with Tools For Apache Cordova

I did the full installation of VS 2015 Enterprise + Tools for Apache Cordova. When I open or create any project It won't build and even show the Ripple Emulator or Device information on the Run button.

I already did a full reinstall and still the same.

When I click the Dependency Check button at the Configuration Window says everything is OK.

When I try to build:

npm ERR! Windows_NT 6.3.9600 1> npm ERR! argv "node" "C:\Users\%UserProfile%\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "-g" "install" "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\packages\vs-tac" "--loglevel" "warn" 1> npm ERR! node v0.12.2 1> npm ERR! npm v2.12.0 1> npm ERR! undefined is not a function 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\%UserProfile%\Documents\Visual Studio 2015\Projects\BlankCordovaApp10\BlankCordovaApp10\npm-debug.log 1> ------ npm install failed. Exit code: 1 1> ------ Package installation failed. Retrying... 1> npm WARN uninstall not installed in C:\Program Files (x86)\nodejs\node_modules: "vs-tac" 1> npm ERR! Windows_NT 6.3.9600 1> npm ERR! argv "node" "C:\Users\%UserProfile%\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "-g" "install" "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\packages\vs-tac" "--loglevel" "warn" 1> npm ERR! node v0.12.2 1> npm ERR! npm v2.12.0 1> npm ERR! undefined is not a function 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\%UserProfile%\Documents\Visual Studio 2015\Projects\BlankCordovaApp10\BlankCordovaApp10\npm-debug.log 1> ------ npm install failed. Exit code: 1 1> ------ Package installation failed. Retrying... 1> npm WARN uninstall not installed in C:\Program Files (x86)\nodejs\node_modules: "vs-tac" 1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(287,5): error : Error installing local npm package. 1>MSBUILD : cordova-build error BLD401: Error : BLD00401 : Could not find module 'C:\Users\%UserProfile%\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.

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I did clean the cache using the Configuration button but still the same. When a run npm cache clear the package install, but the Run Button don't show device information as I said before.

EDIT:

@Subhag Oak Thank you! This brought back the menu options from Run button, but still errors when I try to Run/Build:

------ npm install of [email protected] from C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\APACHECORDOVATOOLS\packages\vs-tac completed. 1>MSBUILD : cordova-build error BLD401: Error : BLD00401 : Could not find module 'C:\Users\FilipeAugusto\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. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

like image 607
Fals Avatar asked Jul 28 '15 14:07

Fals


People also ask

Does Visual Studio support Cordova?

You can use the Cordova Tools for Visual Studio Code extension (which provides support for the latest version of Cordova) or continue using Visual Studio 2017.

How do I run a Cordova project in Visual Studio?

Select Add new app from the menu. Enter a name for your application project, adding an optional description as needed. Select the appropriate OS for your application project (Android or iOS only), then select the Cordova platform option. Click the Add new app button on the bottom-right corner of the page.

Does Visual Studio 2019 support Cordova?

With our Cordova Tools Extension for Visual Studio Code, you can use your existing web skills to build cross-platform hybrid mobile applications for iOS, Android, and other platforms. This means that you can create and maintain one project to target millions of potential customers using various mobile devices.


1 Answers

I solved this issue with this steps: 1. Copy vs-tac folder from: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\Packages\ to the AppData roaming folder.

  1. I opened a VS 2015 Developer Prompt to the AppData\roaming folder where I had copied the vs-tac package and run npm install
like image 143
orellabac Avatar answered Sep 18 '22 16:09

orellabac