Install NPM on Linux

My goal is to install angularjs!

For this I need => npm, so I want to install nodejs for "NPM", but I have this error:

File "./configure", line 16, in <module>
from gyp.common import GetFlavor
File "./tools/gyp/pylib/gyp/__init__.py", line 8, in <module>
import gyp.input
File "./tools/gyp/pylib/gyp/input.py", line 873
except ImportError as e:

There is probably a problem in python 2.5: the problem is that I have no right to update python.

Plz how can i install npm on linux without Nodejs

Helps to evaluate.

Hi

+4
source share
1 answer

Upgrade the system package first and make sure you have the latest packages and their dependencies.

sudo apt-get update

Then install npm (and / or nodejs if necessary)

sudo apt-get install npm nodejs 

Finally, you can install angular with the following command

npm install angular

FYI, The best way to install npm is to install node using the node.js. installer npm is installed as part of node.

+8
source

Source: https://habr.com/ru/post/1598676/


All Articles