E
E
EVOSandru62018-03-26 10:38:11
npm
EVOSandru6, 2018-03-26 10:38:11

How to configure npm to work on linux?

Good afternoon,
After a series of glitches after installing yarn and entering the commands:

yarn install
yarn add vue-router

For some reason, the command broke:
npm run {watch-poll|watch|dev|}
I decided to completely demolish nodejs and npm :
sudo apt-get --purge remove nodejs node npm
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get -f install
sudo apt-get autoremove

Then I try to install again:
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y  nodejs npm

There are no curses.
$ node -v
v9.9.0

$ npm -v
-bash: /usr/local/bin/npm: <b>No such file or directory</b>

$ which npm
/usr/bin/npm

It seemed strange that the paths are different, I tried to create a symbolic link:
$ sudo ln -s /usr/local/bin/npm /usr/bin/npm
ln: failed to create symbolic link '/usr/bin/npm': File exists

Please tell me - what am I doing wrong and how to live with this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
EVOSandru6, 2018-03-26
@EVOSandru6

This helped:
https://askubuntu.com/questions/250971/no-such-fil...
and
chmod -R 777 /var/www/**/*

A
A person from Kazakhstan, 2018-03-26
@LenovoId

I just went through the steps:
1) sudo apt-get install node.js
2) sudo apt-get update && sudo apt-get upgrade
3) sudo apt get install npm
installation goes .. and here is the result
5ab8a8b75135f381091609.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question