简体   繁体   English

为什么我收到此错误 - 错误:EPERM:不允许操作,找不到 mkdir 'C:\Users\Aniket' 命令:create-react-app

[英]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.

相关问题 错误:EPERM:不允许操作,安装 create-react-app 时 mkdir 'C:\Users\...'' - Error: EPERM: operation not permitted, mkdir 'C:\Users\…'' when installing create-react-app 错误:EPERM:不允许操作,mkdir - Error: EPERM : Operation not permitted,mkdir 使用npx命令时出现此错误错误:EPERM:不允许操作, - i am getting this error when i use npx command Error: EPERM: operation not permitted, "反应错误:EPERM:不允许操作" - React Error: EPERM: operation not permitted npm create-react-app myapp 给出错误命令失败:create-react-app spawn EPERM - npm create-react-app myapp gives error Command failed: create-react-app spawn EPERM 我正在尝试安装 React,但我一直收到“错误:EPERM:不允许操作” - I'm trying to install react but I keep getting an 'Error: EPERM: operation not permitted' 为什么我在安装 create-react-app 时收到错误“没有可用于未定义的有效版本” - Why am I getting error "No valid versions available for undefined" while installing create-react-app EPERM 中的错误:不允许操作,打开 - ERROR in EPERM: operation not permitted, open 错误:EPERM:不允许操作,重命名 - Error: EPERM: operation not permitted, rename create-react-app,安装错误(“找不到命令”) - create-react-app, installation error ("command not found")
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM