npx create-react-app my-app 不成功

来源:2-2 【环境搭建】开始我们的第一个React项目

慕移动5278880

2021-02-07

老师,请问下 我输入命令npx create-react-app my-app 后, 系统提示我:
Error: EPERM: operation not permitted, mkdir 'C:\Users’
找不到命令:create-react-app,
我该怎么办? 重新install一个全局的npx create-react-app吗?

写回答

1回答

阿莱克斯刘

2021-02-08


Stackoverflow上找到了与你相似的问题,请参考一下的步骤试试看。

//img.mukewang.com/szimg/6020ec80094aac2515220956.jpg

  1. 管理员运行cmd

  2. 运行 npm config edit

  3. prefix 改为 C:\Users\<User Name>\AppData\Roaming\npm

参考:

https://stackoverflow.com/questions/34600932/npm-eperm-operation-not-permitted-on-windows

0
0

React18 系统精讲 结合TS打造旅游电商平台

React18 精讲 + 结合 TS 实战 + 热门业务开发,获取必备技能

2008 学习 · 1024 问题

查看课程