Npm : Depends node-gyp but won`t install Ubuntu 18.04

After installing Ubuntu 18.04 on another machine, I needed to install the node.js and npm packages. After installing node, npm install failed because node pulled up its links that don't satisfy npm.

Let's consider an alternative possibility of installing not from the regular repository.

1. Removing already installed node.js and partially installed npm :

sudo apt remove --purge nodejs npm
sudo apt clean
sudo apt autoclean
sudo apt install -f
sudo apt autoremove

2. Adding repositories and installing :

sudo apt install curl
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
sudo apt-get update && sudo apt-get install yarn

Source 1 original source 1

3518 3

Comments

Спасибо!
Четко.
Пришлось грохнуть папку node_modules и поставить заново
THANCS!!!
дай бог вам доброго здоровья
You have to log in to leave a comment. Sign in

Similar articles