React 未安装

我正在尝试通过 npm 安装 react 但它给了我这个错误

error An unexpected error occurred: "EPERM: operation not permitted, copyfile 'C:\\Users\\Bilal\\AppData\\Local\\Yarn\\Cache\\v6\\npm-request-2.88.2-d73c918731cb5a87da047e207234146f664d12b3-integrity\\node_modules\\request\\lib\\cookies.js' -> 'G:\\my-react\\node_modules\\request\\lib\\cookies.js'".

我用了很多命令都没有用


哈士奇WWW
浏览 106回答 4
4回答

翻过高山走不出你

我有同样的问题,我所做的是改用这个命令,这样它就不会从本地缓存复制文件create-react-app your_app_name --use-npm --cache /tmp/empty-cache

青春有我

我以前遇到过一些问题,所以我尝试这个并开始工作,如果你使用 avast! 杀毒软件或其他杀毒软件,你必须在 create-react-app 之前禁用

MM们

可能的解决方案:1. Download latest recommended version of NodeJS2. Uninstall current version from Control Panel3. Go to C:\Users\{YourUsername}\AppData\Roaming folder and delete npm and npm-cache folders4. Run installer of NodeJS5. Update NPM to latest with npm i -g npm@latest command line

莫回无

我将目录从 更改C为另一个目录并且它有效。也许问题在于在根驱动器中安装软件包。
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript