[英]I was unable to install the latest nodejs package on my parrot os. i had version 12 installed but wasn't working when i tried create a new react app
error: npm ERR: code EACCES npm ERR: syscall mkdir npm ERR, path /usr/local/lib/node_modules/n npm ERR: errno -13 npm ERR: Error, EACCES: permission denied, mkdir '/usr/local/lib/node_modules/n' npm ERR: [Error, EACCES: permission denied, mkdir '/usr/local/lib/node_modules/n'] { npm ERR: errno. error: npm ERR: code EACCES npm ERR: syscall mkdir npm ERR, path /usr/local/lib/node_modules/n npm ERR: errno -13 npm ERR: Error, EACCES: permission denied, mkdir '/usr/local/lib /node_modules/n' npm ERR:[错误,EACCES:权限被拒绝,mkdir '/usr/local/lib/node_modules/n'] { npm ERR:errno。 -13, npm ERR, code.
-13,npm ERR,代码。 'EACCES', npm ERR!
'EACCES',npm 错误! syscall: 'mkdir', npm ERR!
系统调用:'mkdir',npm 错误! path: '/usr/local/lib/node_modules/n' npm ERR!
路径:'/usr/local/lib/node_modules/n' npm 错误! } npm ERR!
npm 错误! npm ERR!
npm 错误! The operation was rejected by your operating system.
该操作被您的操作系统拒绝。 npm ERR!
npm 错误! It is likely you do not have the permissions to access this file as the current user npm ERR!
您可能没有权限以当前用户 npm ERR 访问此文件! npm ERR!
npm 错误! If you believe this might be a permissions issue, please double-check the npm ERR!
如果您认为这可能是权限问题,请仔细检查 npm ERR! permissions of the file and its containing directories, or try running npm ERR!
文件及其包含目录的权限,或尝试运行 npm ERR! the command again as root/Administrator.
再次以 root/管理员身份执行该命令。
npm ERR: A complete log of this run can be found in. npm ERR. npm ERR:此运行的完整日志可在 npm ERR 中找到。 /home/farsh/.npm/_logs/2022-07-28T20_20_28_180Z-debug.log
/home/farsh/.npm/_logs/2022-07-28T20_20_28_180Z-debug.log
change permission in pwd directory you want to create更改要创建的 pwd 目录中的权限
Like this:像这样:
$ sudo chown $(whoami) -R /path
if doesn't work, try this:如果不起作用,试试这个:
$ sudo chown 777 -R /path
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.