0
I am facing this issue while installing node-sass package I have tried using sudo command but same error prevails
0
I am facing this issue while installing node-sass package I have tried using sudo command but same error prevails
0
TL;DR
sudo npm install -g package_name
Real solution
On the command line, in your home directory, create a directory for global installations:
mkdir ~/.npm-global
Configure npm to use the new directory path:
npm config set prefix '~/.npm-global'
Add the following line to your ~/.bashrc
export PATH=~/.npm-global/bin:$PATH
On the command line, update your system variables:
source ~/.bashrc
To test your new configuration, install a package globally without using sudo:
npm install -g YOUR_NPM_PACKAGE