I'm unable to update npm
, and get it to use with Nodist.
Whenever I try to update npm
with the command
npm install -g npm
the following message comes right after executing it:
(node:5304) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
C:\Program Files (x86)\Nodist\v\nodev6.5.0\npm -> C:\Program Files (x86)\Nodist\v\nodev6.5.0\node_modules\npm\bin\npm-cli.js
[email protected] C:\Program Files (x86)\Nodist\v\nodev6.5.0\node_modules\npm
Doing an npm -v
right after, gives me the previous version:
...> npm -v
2.14.10
However, if you noticed the last line in the message above, there is [email protected]
which means it is somehow trying to install that version of npm
.
I also followed instructions from this post for Ubuntu users and this for Windows users, but they seem to address issues with standalone NodeJS
installations and NOT NodeJS
+ Nodist combo.
Meanwhile, I was wondering if Nodist itself enables us to update npm
, or in other words, does it have any version management feature for npm
as well, just as it does for node
.
Thanks for any help in advance.
I am using Nodist v0.7.1
on Windows 7.
You can try nodist npm latest
Nodist manages npm versions as well as node versions.
Turns out that Nodist versions prior to v0.7.2
have an issue with getting npm
set with Nodist correctly (refer the Nodist changelog).
Performing an npm install -g npm
was in fact installing the latest version of npm
under the v-x64
in Nodist's root installation folder - which is not where Nodist itself looks for npm
installation.
Nodist looks for npm
inside the \bin
folder:
bin
folder's path to your PATH.cd
to the Nodist installation > bin
directory with your terminal,
and then perform:
npm install npm
(not with -g
flag of course).
Alternatively, if npm install
doesn't work in this step, copy an already installed npm
and paste it in the node_modules
folder within the bin
directory.
As a side note, remember to remove some values from your PATH which I suppose may cause conflicts with global package installations (i.e. with -g
flag) with npm
, before installing Nodist, which are as follows:
%appdata%\npm;
OR C:\Users\username\AppData\Roaming\npm;
%ProgramFiles%\nodejs;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With