Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

npm ERR! path /usr/local/lib/nodejs/node-v10.15.3-linux-x64/lib/node_modules while installing angular cli



It's not recommended to use sudo with npm install, follow the steps from npmjs official docs instead :)

Make a directory for global installations:

mkdir ~/.npm-global

Configure npm to use the new directory path:

npm config set prefix '~/.npm-global'

Open or create a ~/.profile file and add this line:

export PATH=~/.npm-global/bin:$PATH

Back on the command line, update your system variables:

source ~/.profile

Test: Download a package globally without using sudo.

npm install -g typescript

    Source: https://docs.npmjs.com/getting-started/fixing-npm-permissions

Comment

PREVIOUS NEXT
Code Example
Shell :: install tor linux 
Shell :: how do i update ubuntu 
Shell :: allow localhose wsl2 
Shell :: is not in the sudoers file 
Shell :: bash try catch 
Shell :: install snap macos 
Shell :: reset to factory settings fortigate 
Shell :: InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files. 
Shell :: ubuntu terminal find file recursive 
Shell :: archive tar 
Shell :: Expose local postgres database over https 
Shell :: pygtk install ubuntu 
Shell :: How can i rename my local master branch to main ? 
Shell :: android check if package is installed 
Shell :: nuget package manager console reinstall all 
Shell :: export commit history github 
Shell :: How to install Apache 2 in Ubuntu? 
Shell :: apt install crunch kali linux 
Shell :: progress bar file.tar.xz extract 
Shell :: start mariadb on linux terminal 
Shell :: how to change ownership back to trustedinstaller windows 10 
Shell :: convert all line endings to unix 
Shell :: how to remove node modules from github 
Shell :: expo upgrade reset 
Shell :: Exit bash script if not running as root 
Shell :: send file to aws ec2 termnal 
Shell :: bash wait for input to continue 
Shell :: how to push forcefully in github 
Shell :: how to install pygame windows 10 
Shell :: create csr ubuntu 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =