"command not found: create-react-app" 尝试创建 React 应用程序时出错
"command not found: create-react-app" error when trying to create a react app
我开始学习 React JS。当我尝试 运行 命令 npx create-react-app myapp
时,出现此错误:
Error: EPERM: operation not permitted, mkdir 'C:\Users\Sameha
command not found: create-react-app
为什么会这样?我安装了节点版本 14.17.5。
这是一个权限错误。您需要做的就是以管理员身份打开 Command Prompt
,然后再次 运行 相同的命令。它应该有望解决您的问题。
尝试使用 npm 在本地 运行 它:
npm install -g create-react-app
然后
npm create-react-app myapp
我觉得你是把节点卸载了,然后重新安装最新的版本,就可以了
我开始学习 React JS。当我尝试 运行 命令 npx create-react-app myapp
时,出现此错误:
Error: EPERM: operation not permitted, mkdir 'C:\Users\Sameha
command not found: create-react-app
为什么会这样?我安装了节点版本 14.17.5。
这是一个权限错误。您需要做的就是以管理员身份打开 Command Prompt
,然后再次 运行 相同的命令。它应该有望解决您的问题。
尝试使用 npm 在本地 运行 它:
npm install -g create-react-app
然后
npm create-react-app myapp
我觉得你是把节点卸载了,然后重新安装最新的版本,就可以了