Trouble Installing Underscore with NPM

Hi,

I am trying to install underscore but my npm version 5.5.1 does not support Node LTS v14.15.0

I have tried to uninstall/reinstall NodeJS. I also tried to update npm with npm install -g npm. Nothing seems to work. Can anyone help with this? I am new to NodeJS. Thank you.

3 Likes

Hi,
I actually struggled with this yesterday.
(and I think the error occurred because you downgraded your version of NPM to 5.5.1 to match Mosh’s…)
Here’s what worked for me.
You do want to update NPM, and in order to do so you would have to delete the folders ‘npm’ and ‘npm-cache’ at location “~AppData/Roaming” (press windows+r and then type ‘%AppData%’ to get there)
then run: npm i -g npm@latest
hope this works

6 Likes

Hi Adina,

It worked! You are a lifesaver. Thank you!

1 Like

Yay!!
So glad to be able to help with my little experience… :grinning:

That was a tough one to find out, thanks a lot Adina, it did work although using a newer version than Mosh is using, hope I can keep up with the course compatibility.
Mosh is good but cannot do all the troubleshooting that comes up I understand.

Lots of luck, xavicwm!!!

I have similar issue but i have mac. So above does not work?

I have tried similar approach to update npm with below commands but no luck:

sudo npm install -g npm@latest
and
sudo npm install -g npm@next
and
sudo npm install -g npm@6.14.11

Error:
WARNING: You are likely using a version of node-tar or npm that is incompatible with this version of Node.js.
Please use either the version of npm that is bundled with Node.js, or a version of npm (> 5.5.1 or < 5.4.0) or node-tar (> 4.0.1) that is compatible with Node.js 9 and above.
npm[30283]: …/src/node_zlib.cc:576:static void node::(anonymous namespace)::ZlibStream::Init(const FunctionCallbackInfov8::Value &): Assertion `args.Length() == 7 && “init(windowBits, level, memLevel, strategy, writeResult, writeCallback,” " dictionary)"’ failed.
1: 0x1012e4da5 node::Abort() (.cold.1) [/usr/local/bin/node]
2: 0x1000a6239 node::Abort() [/usr/local/bin/node]
3: 0x1000a60a1 node::Assert(node::AssertionInfo const&) [/usr/local/bin/node]
4: 0x10014c9c2 node::(anonymous namespace)::ZlibStream::Init(v8::FunctionCallbackInfov8::Value const&) [/usr/local/bin/node]

Fixed my own issue with reinstalling node.

Hi Adina, thanks for the tips. So, after npm i -g npm@latest, what’s the next thing to do on the terminal? Still continue with the npm i -g parcel-bundler? I tried your steps but it didn’t work.

Hi Jayrix, when you reinstalled node to solve this problem, which version did you re-install? Did you use the LTS or the newest version?

Useful topic, thanks! :handshake:

Thank you, did it too, and it’s work for me!!!

I re-installed on the Mac and that worked for me. Thanks…

Thanks a lot, Adina . this worked perfectly