【发布时间】:2020-02-21 21:52:48
【问题描述】:
我正在尝试安装 React,但出现以下错误,我该如何解决?
我正在尝试安装:
npm install -g create-react-app
npm ERR! code EACCES
npm ERR! syscall open
npm ERR! path /home/pedro/.npm/_cacache/tmp/09106e29
npm ERR! errno -13
npm ERR!
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR!
npm ERR! To permanently fix this problem, please run:
npm ERR! sudo chown -R 1000:1000 "/home/pedro/.npm"
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pedro/.npm/_logs/2019-10-25T14_14_48_169Z-debug.log
【问题讨论】:
-
你……你这样做了吗?
-
你使用的是什么版本的 npm ?检查并升级。
-
错误信息中有解决方法
-
@VahidAkhtar 我正在使用 6.11.3 版本的 npm
标签: reactjs