upgrade Appium from 1.4.16 to 1.5.0 - ubuntu-14.04

I am using Appium1.4.16 in Ubuntu14.04.. There is a latest version of Appium been released.. So, I need to upgrade to latest version i.e, Appium1.5.0..
How can I do that ?
Will there be any problem if I try npm install -g appium without removing the older version ?

It will replace old version.
But you can use command :
npm -install -g appium#1.4.16
to install previous version.

Related

Rollback to previous version of NPM

I want to use an earlier version of node v14.7.0 and its respective npm. When I do that I still get the latest version of npm and not the earlier version.
How to get the earlier version?
You can rollback to the old version of npm using the following command
npm install -g npm#<version number>
for example:
npm install -g npm#3.1.1
if you want the latest version you can use:
#latest
instead of version number.
When I do that I still get the latest version of npm and not the
earlier version.
It could be due to not deleting it properly or you might be installing the latest version again.
I recommend you to use nvm if you are using a linux-based OS and nvm-windows for windows based systems. It will help you to keep different versions of node and npm and you can switch later based on the project requirements.
It is easy to install and use. Linux command:
nvm install node
For windows, you can install nvm-windows here.
nvm list
Once you do it, you can install different version of node and it will automatically give its associated npm version:
nvm install `versionnumber`
It is recommended to use Node Version Manager(NVM) to simplify changing versions. Then you can use like below from terminal or command line:
// Check installed versions:
nvm list
// Change version to 15:
nvm use 15
// Check node version:
node -v
// Switch version:
nvm use 16
// Install different version:
nvm install 11

How to upgrade angular-cli on Linux? Node.js V6.14.3 not supported by CLI v6

Whenever I enter ng in termial, it outputs
You are running version v6.14.3 of Node.js, which is not supported by
Angular CLI v6. The official Node.js version that is supported is 8.9
and greater.
Please visit https://nodejs.org/en/ to find instructions on how to
update Node.js
How to fix this issue?
This happens only in non root user account, works fine with root account
Your error message indicates, that your node version is not supported by angular.
So you should rather update node.
The current LTS is 8.11.3 which you can download here:
https://nodejs.org/en/
I've been using 'nvm' for this, it is a node version manager that allows you to install and switch between node versions very easily.
You can find it here:
https://github.com/creationix/nvm/blob/master/README.md
I was using nodejs v4.2.6 and npm v3.10.10
When I ran npm install -g #angular/cli, I think it tried to install latest version of angular-cli, hence I was getting this error.
You are running version v6.14.3 of Node.js, which is not supported by Angular CLI v6. The official Node.js version that is supported is 8.9 and greater.
Due to some reason, I didn't wanted to upgrade to latest node and npm packages, so I resolved it by npm install -g #angular/cli#1.1.1
Use n module from npm in order to upgrade node
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
To upgrade to latest version (and not current stable) version, you can use:
sudo n latest
To undo:
sudo apt-get install --reinstall nodejs-legacy # fix /usr/bin/node
sudo n rm 6.0.0 # replace number with version of Node that was installed
sudo npm uninstall -g n
Found in David Walsh blog

How to Update node.js from 0.10.xx to 4.6?

I've install node in my Laravel project using yum --enablerepo=epel install nodejs npm.
node -v tells me i'm at version v0.10.36
Now I wanted version 4.6, but not sure how to get it installed.
Then I found these instructions, tried them:
npm cache clean -f
npm install -g n
n stable
and got:
install : node-v6.6.0
mkdir : /usr/local/n/versions/node/6.6.0
fetch : https://nodejs.org/dist/v6.6.0/node-v6.6.0-linux-x64.tar.gz
######################################################################## 100.0%
installed : v6.6.0
When I do node -v, I still get v0.10.36
Should I uninstall node with yum and try something else?
Will uninstalling break something in my Laravel project?
Thanks
Try removing node first, then do a clean install.
Use nvm https://github.com/creationix/nvm which is the Node Version Manager. It makes it much easier to switch versions. Then you will need to test your code again to see if there are any breaking compatibility issues and review the newer version of the docs.
BTW as of writing, Node v7 is in beta and brings some significant optimizations over the version you are currently upgrading too.

Why "wanted" is not "latest"?

I am using npm outdated -g --depth=0 to see which globally installed packages have newer version. I am getting this:
$ npm outdated -g --depth=0
Package Current Wanted Latest Location
bower 1.6.8 1.6.8 1.7.1
jshint 2.8.0 2.8.0 2.9.1-rc2
jspm 0.16.13 0.16.13 0.16.19
npm-windows-upgrade 1.0.1 1.0.1 1.2.0
typescript 1.7.3 1.7.3 1.7.5
I can not update any of those packages. npm update -g does nothing. Why Wanted field is has lower version than Latest? I am using windows 7, node 4.2.1 and npm 3.5.2
Since these are global packages there is no package.json to direct their update policy. By default "wanted" version is the same as installed or "current" for global packages. That means npm update will not update them saying that they are at the most recent wanted version.
In order to update them use npm -g install .... Install will use "latest" version from the repository.
npm update -g shouldn't do "nothing" -- you should try npm update -g --verbose and see what that has to say.
I've had to run npm update -g a few times in succession to get it to update everything to the latest.
I just ran into this same issue and had a different solution not yet mentioned. My issue was that my package.json had semantic versioning constraints associated with versions. Given your package bower, for example, with a current/wanted version and of 1.6.8 and a latest version of 1.7.1, it could be possible that your package.json file shows:
"dependencies": {
"bower": "~1.6",
}
Running npm update bower would not update bower past version 1.6 to version 1.7 because of the ~ prefix; to get around this you can run npm install bower#latest to bypass the semantic versioning constraints.

Phonegap installation failure. Sticking to version 0.9.4 by default

Ive been trying to install phonegap for hours now. For some reason by default it installs version 0.9.4 (when I do npm install -g phonegap). If I specify to use latest version (npm install -g phonegap#5.0.0-0.28.1) I get tonns of errors for almost every dependency out there. Tried reinstalling node, removing modules, clearing npm cache, etc.
Windows 7
Node version 0.12.5 (x64)
Npm version 2.11.2
I had this problem before with my Mac
to fix this, i just simply ran
npm update -g phonegap
and behold it updated itself to 5.0.0

Resources