Solve the problem of insufficient permissions for npm install

About solving the problem of Error: EACCES: permission denied, mkdir

Insert image description here

The main reason for this problem is that the permissions of the node installation directory are insufficient. Find the node installation path.

Insert image description here
If your installation directory does not have the two files node_cache and node-global, you can use Baidu. (Modify node_cache and node-global to the installation directory through commands)

Insert image description here
Click Edit to modify permissions

Insert image description here
It is best for Users to also modify their permissions

Insert image description here
After the modification is completed, no error will be reported when executing npm install in the future.

Guess you like

Origin blog.csdn.net/m0_61427728/article/details/128250978