简体   繁体   English

我无法在我的鹦鹉操作系统上安装最新的 nodejs package。 我安装了版本 12,但是当我尝试创建一个新的 react 应用程序时没有工作

[英]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.

相关问题 我尝试创建一个React应用,但是当我拥有9.7.2版的节点和6.4.1版的npm时却出现了错误 - I tried to create a react app but it is givinig me errors when I had the node version 9.7.2 and npm version 6.4.1 我已经在我的系统上安装了 NODEjs,但是当我检查 nodejs 版本时,它没有给我版本。 我应该怎么办? - I had installed NODEjs on my system but when I check for nodejs version its is not giving me the version. What should I do? 我使用nvm安装了最新的node.js版本,但是当我尝试更新npm时,它不起作用 - I used nvm to install the latest node.js version, but when I tried to update npm, it doesn't work 我想安装最新版本的nodejs - I want to install nodejs with latest version 无法安装最新版本的 nodejs。 我尝试安装 nodejs 17.x - Unable to install latest version of nodejs. I try to install nodejs 17.x npx create-react-app 花费的时间太长。 安装nodejs最新版本,npm最新版本 - npx create-react-app is taking too long. Installed nodejs latest version, npm latest version 我安装了最新的 nodejs 版本,但我也无法更新 npm (windows) - i have latest nodejs version installed,but i can't update npm as well (windows) 我为测试创建了一个包 npm,安装后我无法检索我的函数的参数 - I had created a package npm for test and i can't retrieve the params of my function after install it 我从源代码安装了 Node-12,但无法获取 nodejs --version - I installed Node-12 from source but can't get nodejs --version 无法清除 npx 缓存并安装新版本的 create-react-app 即 5.0.0 - Not able to clear npx cache and install the new version of create-react-app i.e 5.0.0
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM