-
-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create react app won't work on Windows if there are spaces in your username #6512
Comments
It sounds like all we can do is display a more helpful error message in this case (until the bug is fixed in npm/npx). Would you be interested in submitting a PR to do that? Also, do you know what happens if you try this with yarn? I don't have a Windows 10 machine to test on. If yarn works we could suggest that as a workaround. |
I can confirm that pretty much the same thing happens with yarn. Looks like this:
|
Thanks for investigating that. It's too bad we can't offer Yarn as a workaround. Is there an open issue related to this in Yarn? If not could you create one? |
There's no issue for this created on Yarn. I'll create one |
@Kacppian Thanks. Please link to the issue here. Would anyone like to make a PR to add a friendlier error message in Create React App? |
I'd love to! |
Great! It's all yours. |
having the same issue |
Hey @Kacppian are you still planning to tackle this? If not, I'd love to make a quick PR for it sometime this week. |
Refer to zkat/npx#181 (comment) for those who need a "right now" fix. |
Hey @ryandrew14, please do so. |
Has this still not been fixed ? |
Today I encountered a similar issue with npx create-react-app my-app(mkdir failed). Reason for my error
How I fixed it
And that got executed successfully. Hope this helps. |
Thanks, @malhar234! Worked perfectly. |
Thanks Malhar it worked for me too. Its been very frustrating |
Thank you @malhar234 |
Unfortunately, npx still seems to have issues for windows users (Windows account user manager enforces First Name, Last name paradigm which makes it a real problem). Switching to trusted npm install. |
U are a true legend m8 :) |
You are awesome <3 |
Lifesaver! |
@ssmkhrj Thank you! |
Please fix this Creating a new React app in C:\Users\veer singh\Desktop\MERN\Assignment2\myapp. Installing packages. This might take a couple of minutes. npm ERR! cb() never called! npm ERR! This is an error with npm itself. Please report this error at: npm ERR! A complete log of this run can be found in: Aborting installation. Deleting generated file... node_modules |
When I used
However, with |
I'm writing this in January 2021, and this issue still exists. You can either go the npm route or change the cache folders location with this |
Thank you @ssmkhrj @AlexChungA @KndaNoob ! |
Hi friends |
Here's the FiX you've been waiting for!Good day everyone... I'm happy to let you all know I've found a good fix for the space in your username without loosing your files/data **###
** The main reason ### WARNING!!!! How to Rename User and User Profile Folder in Windows 10/8/7Important: To apply the steps below you must sign in to Windows, by using an account with Administrative privileges. Assumption: Let's suppose that the current username and the related profile folder is named "Josh" and you want to change the account name and the profile folder name to "Joshua". Step 1. Rename the User from User Account Properties
### Step 2. Change the User Profile Folder Path in Registry.
### Step 3. Rename the User Profile Folder.
* Note: If you receive an "Access denied" error, when you try to rename the user folder, then try to rename the folder in Safe Mode or try the following:
**Step 4. FIX Invalid Registry References.The next step, is to fix in the Registry, the references to the old profile folder. To do that:**
Step 5. Rebuild the Search Index.The final step is to rebuild the search index. To do that:
That’s all guys! Did it work for you? |
I solved this using the following command.
then
Thanks for this! Worked for me too. |
npm cache clean --force |
No caps and no spaces. What is this 1960? I supposed I'll have to rename the user, manually edit the registry, and rename a bunch of folders. 😢 |
No that's not necessary. People have already posted work arounds above that
work.
…On Wed, May 26, 2021, 12:34 PM jaacko-torus ***@***.***> wrote:
No caps and no spaces. What is this 1960? I supposed I'll have to rename
the user, manually edit the registry, and rename a bunch of folders. 😢
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6512 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOR5YQ4YBMOAUMVWQVFPR63TPUPH5ANCNFSM4GZ3K5CA>
.
|
@SeanPaulson Those didn't work. I keep getting the same error. |
You tried installing react app globally?
…On Wed, May 26, 2021, 2:20 PM jaacko-torus ***@***.***> wrote:
@SeanPaulson <https://github.com/SeanPaulson> Those didn't work. I keep
getting the same error.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6512 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOR5YQ3VXQ4UBPAQQYS5DV3TPU3WVANCNFSM4GZ3K5CA>
.
|
@SeanPaulson Yes! And cleaning the cache, and also changing the cache location. |
@jaacko-torus, If you are still seeing that problem (without username change), can you please paste the error you are getting? |
@iamdevelopergirl Sadly, I gave up and reinstalled Windows because I didn't want to deal with the registry in order to change my username. Thank you for your concern. |
You shouldn't need to deal with the reg.
There are a few fixes listed in here that will work.
…On Mon, Aug 23, 2021, 12:26 PM jaacko-torus ***@***.***> wrote:
@iamdevelopergirl <https://github.com/iamdevelopergirl> Sadly, I gave up
and reinstalled Windows because I didn't want to deal with the registry in
order to change my username. Thank you for your concern.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6512 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOR5YQZMXF6CWYOCKT3ZTWDT6KHGPANCNFSM4GZ3K5CA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
npx create-react-app second Creating a new React app in /workspaces/crud-api-creation-timeline/nextjs/second. error An unexpected error occurred: "/workspaces/crud-api-creation-timeline/package.json: Unexpected token < in JSON at position 264". yarn add v1.22.10 Aborting installation. Deleting generated file... package.json |
I was having problems running the command: |
Yo welcome @filipescaglia |
The |
… in your username facebook#6512 Added code to check if user is on Windows paltform and if the path to create react app project contains space, then console.error a helpful message, and process.exit(1)
Hey, to resolve this issue I have created PR #12780, this will show a helpful message to Windows users if the project path contains space. |
Yes, it is working without any issue. |
tl;dr - zkat/npx#100 is an issue for create-react-app since all Windows 10 users with a space in their name won't be able to use create-react-app (unless they rename their user account home directory, a heavy process). It is not a friendly experience to dig around the internet to find the above-mentioned npx bug. Details below.
Is this a bug report?
Yes. Bug is with downstream dependency (npx and node) but it directly affects create-react-app.
Did you try recovering your dependencies?
No, because the bug happens even before I can start anything.
Which terms did you search for in User Guide?
"windows"
Environment
Windows 10 Professional
When I try to collect platform information, here is what I get (inside cmdr):
Steps to Reproduce
I posted these steps to the npx repository upstream bug:
zkat/npx#100 (comment)
Steps:
npx create-react-app my-app
; it fails with the mentionedEPERM
error (below).npm init react-app my-app
, alternate command mentioned on the Create React App README; same error (below).This is the error:
All Windows users with a space in their filename will encounter this issue. It looks like there was some movement at zkat/npx#181 , but then the work tailed off and wasn't merged. Perhaps if the proper fix can't get completed anytime soon, a more informative message could get printed when the problem is detected.
Expected Behavior
Create react app creates an app.
Actual Behavior
The error message shown above.
Reproducible Demo
Since this is an OS issue, just get Windows 10, make a user with spaces in the name like "Jane Doe", then try doing the first 3 commands in the create react app guide.
The text was updated successfully, but these errors were encountered: