Update Cordova on Windows
Note: Make sure you close all instances of Visual Studio before starting this process.
- Download and install the latest version of Node.js from nodejs.org.
Update npm. To check your current npm version run the following command in a console:
npm -v
To update to the last version of npm run the following command in a console (elevated As Administrator):
npm install -g npm
Update Cordova. To check your Cordova version run the following command in a console:
cordova -v
To update to the last version of cordova run the following command in a console (elevated As Administrator):
npm install -g cordova
Update the vs-mda
version of Cordova with the latest you just installed in the previous step. Cordova is (globally) installed at %APPDATA%\npm\node_modules\cordova
. vs-mda
copy of Cordova is available at %APPDATA%\npm\node_modules\vs-mda\node_modules\cordova
. Replace the entire content of this folder with the one of the global Cordova installation.
- Install missing modules (this might depend on the latest version you install). For 5.3.3 I had to install
concat-map
and balanced-match
. If anything else is necessary it should show up in the output log when you build your Cordova project.
npm install -g concat-map
npm install -g balanced-match
Update Cordova on Mac
Note: Make sure you stop the vs-mda-remote
agent before performing this
upgrade.
Open a Terminal session and run the following command:
sudo npm update -g cordova
- Update the
vs-mda-remote
version of Cordova with the the latest you just installed in the previous step. Cordova is (globally) installed at /usr/local/lib/node_modules/cordova
. vs-mda-remote
copy of Cordova is available at /usr/local/lib/node_modules/vs-mda-remote/node_modules/cordova
. Replace the entire content of this folder with the one of the global Cordova installation.
- Restart the
vs-mda-remote
agent.
With all these installed you should be all set to start building with the latest version of Cordova.
NOTE
Pay attention if you clear cordova cache
from Visual studio options menu, you need to do this procedure again. because it will copy older version into (for me 4.0.0) %APPDATA%\npm\node_modules\vs-mda\node_modules\cordova