how to install node 4.4.7 and npm 3.8.9? - npm

By default node 4.4.7 comes with npm 2.15.8 version.
How can I modify npm version to 3.8.9 with same node version?
npm update #npm3.8.9 or upgrade didn't do.

Try like this
npm install npm#3.8.9
If you want to install latest version of npm
npm install npm#latest
here latest is the keyword
We can also upgrade node via npm
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
The n package represents a Node helper, and running the last command upgrades node to the latest stable version. Instead of using "stable", you could specify a desired version:

To upgrade, run: [sudo] npm install npm#latest -g if you don't want the latest provide the version number there

Related

node-sass command failed- MAC OS

i'm having issue running ( npm install )
where my
node version is : v16.18.0 nvm version : 0.39.1 npm version : 8.19.2 node-sass : 6.0.1 node-gyp -v v7.1.2
I'LL ATTACH PICTURE OF NPM LOG.
tried to remove out node modules and pkg lock
also. tried to install it globally and run npm i again .
i unfortunately can't upgrade the pkg version so i need to keep the node-sass 6.0.1

Why I can't get NPM upgraded?

Here is how I install NPM on a Linux Mint 19.
sudo apt install nodejs
sudo apt install npm
The NPM version I get is 3.5.2, which is not the current version. To upgrade, I try the following commands.
sudo npm install latest-version
which has a few warning messages such as "not such file or directory, open '/home/me/package.json'"
and
sudo mpn install npm#latest -g
which runs without any warning or error messages.
The command
npm -v
still yields 3.5.2.
What is missing?
Also, the reason of using sudo in those upgrade commands is to work around some access permission.
try running:
which npm
and
sudo which npm
I suspect by running sudo apt-get ... you installed npm for your root user as opposed to your current user.
Try this command: npm install -g npm#latest or npm install -g npm#next
You can update NPM with: npm install -g npm.
See this Q&A for more variations that might occur/needed.

SailsJS not updating

I haven't used sails in a long while and was about to start a new project but wanted to update my older 0.12.14 version to 1.0.2. I first tried doing
$ npm update -g
and then running
$ sails -v
This returned
0.12.14
Confused, I listed the npm global packages
$ npm list -g --depth=0
and this returned the list of global packages without sails.
I tried
$ npm uninstall sails -g
and when running
$ sails -v
or even
$ sails new test
it appeared to continue working. Checking the version in the package.json of the test project revealed that the old version was still alive and kicking. I'm out of ideas on how to update / uninstall sails.
To update Sails.JS, use npm install sails -g instead of npm update -g
If that isn't working, be sure to update to the latest npm & Node.JS:
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
then
sudo npm install sails -g
To manually download and install Node.JS: https://nodejs.org/en/

Which npm version is correct?

I just install npm 2.11.1,but when I use npm -v command it tells me the version is 2.10.1.
I want to know what's wrong and how can I handle it?
My computer is Windows operating system
If you install n you can update your npm to the latest stable version by this command
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
UPDATE :
for windows you can download and run the latest MSI. The MSI will update your installed node and npm.

npm install jhipster package yo does not satisfy

I m trying to install jhipster. I followed steps on https://jhipster.github.io/installation.html , but last step (npm install -g generator-jhipster) returns me:
npm ERR! peerinvalid The package yo does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer generator-jhipster#2.1.1 wants yo#>=1.3.0
I have centOS 7 and npm was installed from repository
npm -v
1.3.6
I already tried update yo, but seems its up to date for this npm.
npm update -g yo
UPDATE:
Fixed by adding new repostory:
curl -sL https://rpm.nodesource.com/setup | bash -
I was able to install higher version of yo
Fixed by adding new repostory:
curl -sL https://rpm.nodesource.com/setup | bash -
I was able to install higher version of yo