-1

Apache Cordova Dependency Checker fails in VS Community 2015. It was previously working on this computer until I ran several VS and 3rd party tools updates. Here's what I've done to try to resolve the issue:

  1. Installed VS / Apache Cordova (no error messages displayed) following article https://taco.visualstudio.com/en-us/docs/install-vs-tools-apache-cordova/
  2. Run Apache Cordova Dependency Checker but VS freezes with the error message - VS 2015 has stopped working, windows will try to restart the program.
  3. I restarted VS and cleared Cordova cache, checked environment variables (all good), then tried Apache Cordova Dependency Checker with the same freeze result.
  4. I tried to update Apache Cordova with the fix option (no error messages) but received the same freeze results.
  5. I completely uninstalled Apache Cordova, 3rd party tools (following article https://support.microsoft.com/en-us/kb/3016536), and VS community and then reinstalled them (no error messages) but received the same freeze results.
  6. I installed Apache Cordova on another computer and the dependency checker phonegap app... worked. Unfortunately that's not a computer that I have access to.

What else can I do to resolve the Apache Cordova installation issue?

Thanks for any help, Mike

Mike
  • 136
  • 13
  • Regardless of the installation issues I'm having, I just tried to just build the phone gap application and received the following error: Cardova is not currently installed and no version was specified in taco.json. I think that is odd because it is installed according the checkmark on Visual Studio Community 2015 updates - HTML/JavaScript (Apache Cardova) Update 8.1. Any ideas? – Mike Apr 15 '16 at 17:26

1 Answers1

1

Since my original post, I've had to resolve Visual Studio, Ionic, Cordova, Phonegap, plugin... environment issue several times. I've found the below works best:

  1. Ensure platform matches plugin requirements, see platform in config.xml e.g. 6.1.1
  2. Uninstall, reinstall latest jdk (adobe)
  3. Clear MEF Cache - download the tool and follow instructions
  4. Download/install latest node.js

Run the following from the command line:

  1. Clear cache: Npm cache clean
  2. Install latest npm: npm install -g npm
  3. Uninstall cordova: Npm uninstall -g cordova
  4. Reinstall cordova: Npm install –g cordova (note, this took 5+ tries to complete without errors. No other changes were made between runs. Not sure why. Found others complaining about the same issue.)
  5. Remove Android platform: Cordova platform remove android
  6. Install Cordova platform add android@6.X.X (Note, as of 4/20/17 cordova and android compatibility issue. Build error - unable to find installed version of gradle. resolved by running (npm install -g cordova@6.4.0) and (cordova platform add android@6.1.2). Addt'l build errors, resolved by updating components in Android SDK Manager)
  7. Uninstall/Reinstall plugins from the command line. For example:
    • cordova plugin remove phonegap-plugin-push
    • cordova plugin add phonegap-plugin-push variable SENDER_ID="YourID#"
  8. npm install bower -g
  9. Restart Visual Studio - Verify plugins were installed via config.xml

Install Ionic:

  1. npm uninstall -g ionic
  2. npm install -g ionic (note: to install specific version, npm install -g ionic@2.2.3)
  3. $ ionic platform add ios
  4. $ ionic platform add android (note: redundant, already added above)

I recommend putting as much of this as possible in a batch file with a pause between commands. Verify each command was successful, if not press ctrl+break at the pause to term the batch file early. The batch file is an easy way to restore your environment when everything breaks again. Stuff happens!

I also started using a VM (oracle virtualbox) for my development environment. That way I can backup my environment before making changes and easily restore. Don't forget to upload to GIT on a daily basis. GIT and VMs are my lifesavers.

Cool NPM commands:

  1. npm list (lists all installed packages)
  2. npm prune (removes packages not depended on by your project according to your package.json)
  3. npm outdated (tells you which installed packages are outdated with respect to what is current in the npm registry but allowable by the version definition in your package.json. Make sure all up-to-date)

Please feel free to add/make suggestions to the above list. -Mike

Community
  • 1
  • 1
Mike
  • 136
  • 13