Ubuntu 18.10 - unable to install NPM

I tried to install npm and I repeatedly got error that NPM depends on package node-gyp (>= 0.10.9) but that package is not installable.

I have no packages broken (I search for them using dpkg) but I still can not install NPM.

I can install just nodejs but I need also npm...

Can anyone help me?

4

2 Answers

Get it installed with these steps if the above comments methods doesn;t fly:

# For the soon to be LTS release, 10.x
curl -sL | sudo -E bash -
# For the bleeding edge, 11.x
curl -sL | sudo -E bash -

Then install with sudo apt install nodejs.

1

Uninstall node and install it again with Node Version Manager(first install NVM,then with NVM node version you wish),on this way you will not have any problems with node-gyp or NPM .Good luck.

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like