Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node提示没有权限 #138

Open
itgoyo opened this issue Apr 8, 2019 · 0 comments
Open

node提示没有权限 #138

itgoyo opened this issue Apr 8, 2019 · 0 comments

Comments

@itgoyo
Copy link
Owner

itgoyo commented Apr 8, 2019

npm ERR! Error: EACCES: permission denied, access '/opt/node-v10.15.3/lib/node_modules'
npm ERR!  { [Error: EACCES: permission denied, access '/opt/node-v10.15.3/lib/node_modules']
npm ERR!   stack:
npm ERR!    'Error: EACCES: permission denied, access \'/opt/node-v10.15.3/lib/node_modules\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/opt/node-v10.15.3/lib/node_modules' }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/itgoyo/.npm/_logs/2019-04-08T14_07_18_160Z-debug.log

这需要给文件夹所有权限即可

sudo chmod -R 777 /usr/local/lib/node_modules/

根据真实情况而定

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant