[英]Why I am getting this error - Error: EPERM: operation not permitted, mkdir 'C:\Users\Aniket' command not found: create-react-app
I have installing react app using this command我已经使用这个命令安装了反应应用程序
$ npx create-react-app my-app
Then I got Error like this:然后我得到这样的错误:
Error: EPERM: operation not permitted, mkdir 'C:\Users\Aniket'
command not found: create-react-app
I have seen some online resources they are saying I have to remove space from my Windows Username, isn't there any other way of make this work?我已经看到一些在线资源,他们说我必须从我的 Windows 用户名中删除空间,没有其他方法可以使这项工作吗?
Make sure you've node>=8.10 and npm>=5.6 already installed确保你已经安装了node>=8.10 和 npm>=5.6
Try installing it globally first, using the command尝试先全局安装,使用命令
npm install -g create-react-app
And then, you can create your app using the command,然后,您可以使用命令创建您的应用程序,
npx create-react-app <Name of your app>
Hope this helps:)希望这可以帮助:)
Go to c:/users open command prompt and run dir /x
check shorter name you found with dir/x as shown in image and run npm config set cache "C:/Users/<shortname-you-found-with-dir/x>/AppData/Roaming/npm-cache" --global
Go to c:/users open command prompt and run
dir /x
check shorter name you found with dir/x as shown in image and run npm config set cache "C:/Users/<shortname-you-found-with-dir/x>/AppData/Roaming/npm-cache" --global
In my case it's CYBERC~1.就我而言,它是 CYBERC~1。
this works fine in my case.这在我的情况下很好用。
The easiest way for me is:对我来说最简单的方法是:
mkdir C:\cache
npm config set cache "C:\\cache"
And then run the command again.然后再次运行该命令。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.