[[+content_image]]
D
D
Dmitry Mukhin2018-02-16 12:17:44
Node.js
Dmitry Mukhin, 2018-02-16 12:17:44

Setting up a CentOS server. Error installing node+npm?

Installed node js on server. But after installing it, npm doesn't work. What the console outputs (I use the shell client in ispmanager):

[[email protected] ~]# node -v                                                                                                    
v6.12.3                                                                                                                        
[[email protected] ~]# npm -v                                                                                                     
-bash: npm: command not found                                                                                                  
[[email protected] ~]# which node                                                                                                 
/bin/node                                                                                                                      
[[email protected] ~]# which npm                                                                                                  
/usr/bin/which: no npm in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)                             
[[email protected] ~]#

They wrote on the internet that this is due to the wrong npm installation path. But it's not clear how to fix it.

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
R
RidgeA, 2018-02-16
@RidgeA

you need to find where npm is installed and register it in PATH
In general, I advise you to install the latest LTS version.

R
rustler2000, 2018-02-16
@rustler2000

On "production" through npm deploy - dangerous for health

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question