这里写自定义目录标题
用npx create-react-app创建项目遇到的问题
在学习创建react项目时,运行npx create-react-app命令遇到了两个错误,其一是npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs,其二是npm ERR! Could not install from “Gao\AppData\Roaming\npm-cache_npx\18376” as it does not contain a package.json file。
问题一
以管理员身份运行
问题二
原因是在建立cache的路径下有空格,利用npm config set cache “路径” 即可