I'm trying to update my version of phonegap:
C:\Users\jhutber>phonegap -v
3.3.0-0.19.6
npm update -g phonegap
//runs....
//even updating npm
npm update npm -g
C:\Users\jhutber>npm info phonegap version
3.3.0-0.19.6
So how can I update my machine to use phonegap 3.4.0?
I'm using Windows 7.
$ sudo npm update -g cordova
its the command for update your Phonegap App...
in case you need more information visit:
http://docs.phonegap.com/en/3.4.0/guide_cli_index.md.html#The%20Command-Line%20Interface
Was looking at doing similar, hit the same issues. In the end I removed phone gap using a variety of
npm uninstall -g phonegap
npm uninstall phonegap
npm un phonegap
npm rm phonegap
npm -g rm phonegap
one of them worked, all of them complained.
Then check phonegap was gone, and
npm install -g phonegap
Seemed to work now at version 3.4.0-0.19.7
As an aside, I also drew a pentagram around my desk using the blood of a recently slaughtered goat, and I'm seriously starting to think that was the clincher..
Cheers
Ant
Related
I'm trying to understand how to update my Ionic Framework Version.
ionic info
Your system information:
Cordova CLI: 8.0.0
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 1.1.0
Ionic CLI Version: 1.7.16
Ionic App Lib Version: 0.7.3
OS:
Node Version: v6.9.1
So the current Ionic Framework Version is "1.1.0"
I updated my bower.json:
{
"name": "hello-ionic",
"private": "true",
"devDependencies": {
"ionic": "driftyco/ionic-bower#1.3.3"
}
}
and run bower install
but the new files are being stored at 'bower_components' folder
My folder structure:
I also copied the files from 'bower_components' to 'lib' folder and still after ionic info the 'Ionic Framework Version' is still '1.1.0'
Try with
npm install -g ionic#1.3.3
After the CLI has been updated you have a few options when it comes to updating your base library install, goto the root of your project and run this command:
ionic lib update
Here for more details. hope it helps.
Try to upgrade the project to the new versions:
npm install -g ionic#latest
npm install ionic-angular#3.7.0 --save
npm install #ionic/app-scripts#3.0.0 --save-dev
npm install #angular/core#4.4.3 --save
npm install #angular/common#4.4.3 --save
npm install #angular/compiler#4.4.3 --save
npm install #angular/compiler-cli#4.4.3 --save
npm install #angular/forms#4.4.3 --save
npm install #angular/http#4.4.3 --save
npm install #angular/platform-browser#4.4.3 --save
npm install #angular/platform-browser-dynamic#4.4.3 --save
npm install rxjs#5.4.3 --save
npm install zone.js#0.8.17 --save
In addition to improving ionic-angular 3.x.
Also, if you're using animations, run the command:
npm install #angular/animations#4.4.3 --save
It looks like you might actually want
npm update packagename
which does try to honor semver, and does recursively update all the dependencies of packagename. Of course, it does them all recursively asynchronously at once.
If you can give up the need for updating deps-of-deps, then you can get pretty far with
npm --depth 0 update grunt
After a research:
npm will correctly handle version conflicts between shared
dependencies by downloading the correct one for each. So, if Dep A
depends on Dep C v1.0.0 and Dep B depends on Dep C v2.0.0, they will
each be installed and used appropriately. Therefore, you are free to
install the latest of any packages you would like.
Then, feel free to update update package by package or use (AFTER UPDATE YOUR ANGULAR PACKAGES) and exclude for a while the ionic packages from the packages.json to don't update them:
npm i -g npm-check-updates
ncu -u
npm install
The ultimate version of IONIC v1 is 1.3.5, I guess.
You'd better make a global install of ionic, first.
sudo npm i -g ionic
Then, install new Ionic v1 CLI Utility locally for CLI commands as it has been released for v1 project maintenance.
npm i #ionic/v1-toolkit
try command: npm install -g cordova ionic.
simple run
ionic lib update
See official Docs
While the other answers are correct only on updating ionic version with experience I can say you might have old dependencies which might crash with your upgrade so best is to use, https://www.npmjs.com/package/npm-check-updates after installing the package run npx npm-check-updates this will recommend and update all your packages to latest stable.
I am using Ionic 3. Right now I'm trying to do ionic cordova build android , but I get TypeError: env.runcmd is not a function (please see the photo attached).
I tried to:
-> ionic cordova platform rm android then ionic cordova platform add android then again build android again
-> delete node_modules folder and do npm install then build android again
But none of them helped it...
My ionic info output:
Just use command 'cordova run android' instead of 'ionic cordova run android'.
Okay, guys, the problem was exactly with cordova version. I haven't noticed when it did update to the version 7.0.1. However, I had to downgrade it to version 6.5.0 and then android build succeeded.
The only thing that confused me was the downgrade process. Every time I did sudo npm uninstall cordova -g, the cordova command was still available at bash. If I would do sudo npm install cordova#6.5.0 -g, the version still remained 7.0.1. Even some other commands such as ... --save --save-exact ... did NOT work.
So below are the steps which I've gone through to solve this issue (I am using Ubuntu linux, so this will work for linux users only).
First I uninstalled cordova through npm
sudo npm uninstall cordova -g
Then removed the program from local bin
sudo rm /usr/local/bin/cordova
Installed the specific version of cordova
sudo npm install cordova#6.5.0 -g (or whatever version you want)
And lastly, I have to admit that after cordova installation, it was now located at /usr/bin/cordova, no more at /usr/local/bin/cordova, so I had to create a hard link to it.
sudo ln -s /usr/local/bin/cordova /usr/bin/cordova
VoilĂ !
When I try to run the command npm install -g cordova ionic, it gets stuck for hours.
I also faced the same problem .So, somewhere I found the below command which worked for me. npm install -g ionic cordova
Follow the below step for proceeding further
Clean the npm cache
Update npm and node version
reinstalling npm and node
I found that changing my Environment Variable TEMP to = C:\tmp worked.
use this tutorial https://docs.npmjs.com/cli/cache
I have a problem with my develop because when I try ionic serve or every command of ionic or cordova, make me an error. A img to display:
I tried everything and search it but nothing.
You may need to downgrade your Ionic CLI version. Try the following:
npm uninstall -g ionic
npm install -g ionic#2.1.0
This might be an issue just with Ionic 1 apps, and not with Ionic 2.
while installing ionic npm install -g ionic getting error.
Have tried : -
npm cache clean 2. run the cli by administrator 3. restarted the system but error remain same.
Badly stocked.
I was having same problem on Windows 8 (64 bit)
Solution:
Don't forget to install other dependencies before installing ionic http://ionicframework.com/docs/guide/installation.html
1) Uninstall Node from Control Panel
2) Restart PC
3) Download (MSI Installer) older version of Node from http://nodejs.org/dist/v0.10.38/ or 64bit http://nodejs.org/dist/v0.10.38/x64/
4) Install Node version 0.10.38
5) npm install -g cordova
6) npm install -g ionic
Done!
it is not nessesary to uninstall node...
just remove the old npm ionic folder
...AppData\Roaming\npm\node_modules\ionic
and try again
npm install -g ionic
For me the answers provided did not work. I got around this problem by installing cordova and ionic at the same time.
npm install -g cordova ionic
If proxy is preventing this, other things to try are setting the proxy, making http request and disabling strict-ssl. An example of setting proxy is
npm config set proxy=http://username:password#domain:port/
To make http request only change the config
npm config set registry=http://registry.npmjs.org/
To disable strict-ssl
npm config set strict-ssl=false
Also, if you wanted to view the default list of configs type
npm config ls -l
This will also show what configurations have been overridden.
Uninstall Node.js and install freshly after done installation run the following command
npm install -g ionic cordova
That's it.