Can\'t install the node-sass package via npm sudo npm i
, i have been trying to resolve via sudo npm i -g node-sass --unsafe-perm=true --allow-root
but
I followed the instructions as per @WaLid LamRaoui's answer as I also use to run npm install with sudo. It seemed to have done the trick in terms of changing the owner of the folder, but I still got an error when trying to run npm install
. I then realized another problem which has to do with my cache folder which contains root-owned files, so for those whose also have this problem after following the approved answer, I simply did this:
sudo chown -R 1003:1003 "/home//.npm"
After this I ran npm install
and it worked fine.