admin管理员组文章数量:1316974
I am making my first react app and running mand: npx create-react-app my-app
and i am getting this error:
Error: EEXIST: file already exists, mkdir 'C:\Users\Deepak'
mand not found: create-react-app
Can anybody please help me to resolve this error?
I am making my first react app and running mand: npx create-react-app my-app
and i am getting this error:
Error: EEXIST: file already exists, mkdir 'C:\Users\Deepak'
mand not found: create-react-app
Can anybody please help me to resolve this error?
Share Improve this question edited Apr 16, 2021 at 8:08 Klaassiek 2,9061 gold badge25 silver badges44 bronze badges asked Apr 15, 2021 at 18:44 061_Deepak Singh Rawat061_Deepak Singh Rawat 311 silver badge2 bronze badges4 Answers
Reset to default 6Follow these steps, it will definitely work:
npm uninstall -g create-react-app
npm install -g create-react-app
npx create-react-app the-name-of-your-app
I do have space in my UserName folder so I tried this run the mand
npm config edit
set the variable cache=C:\Users\{UserName}
and save the file
This work in my case, hope it will help u too
It seems you have a my-app folder/directory in C:\Users\Deepak
. Could you try as below?
npx create-react-app my-super-app
It seems you have a space in your users directory Deepak
. That is the most mon reason for this type of error.
NPX
uses C:\Users\[username]\AppData\Roaming\npm-cache
while executing. It has a bug which prevents it from running if there is space in this path.
To remedy this problem you need to update the npm cache path by replacing the string after the space with ~1
E.g.
npm config set cache C:\Users\Deepak~1\AppData\Roaming\npm-cache
This will set npm cache path without the space.
After this if you run npx it should work fine without throwing any error.
NOTE: You might want to run this mand and the npx mand with administrative rights or you might get permission error
本文标签: javascriptusing createreactapp I get EEXIST file already existsStack Overflow
版权声明:本文标题:javascript - using create-react-app I get EEXIST: file already exists - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742019959a2414446.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论