Answer the question
In order to leave comments, you need to log in
How to solve the problem with rights?
When installing npm packages, for example: sudo npm i -D node-sass
the permissions of the package.json file change from user to root, and do not allow editing package.json in a text editor, you have to change permissions sudo chown atom:atom package.json
when installing any npm packages, how to solve this problem in which direction to dig?
Answer the question
In order to leave comments, you need to log in
standard error. Copying from another question:
You're doing sudo but trying to install a package locally.
What you need is done in the project directory and without sudo. sudo is only needed when installing a package globally: sudo npm install express-generator -g
. When you install a lib for development, sudo is unnecessary and even harmful: npm install gulp-some-plugin --save-dev
.
Once again: if there is -g, then you need to sudo, because changes are made to the system, globally. If there is --save or --save-dev (-D in your case), then this is written in the package.json of this project, locally, admin rights are not needed for this, so sudo is not needed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question