-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
cannot run yarn create if yarn is in a folder where the file path has a space #6851
Comments
Just spent an hour on this very issue until realizing this was the cause - spaces in the profile name. |
If easy, putting quotes around the command would resolve it and still work with non-spaced paths |
It's been a year now, can we get an update on this? |
You need to change the cache to a location without spaces. yarn config set cache-folder "your path without spaces" Did work for me!! If this solve your problems, let me know! |
I also had to change the prefix
|
It is now 2021 and this is still not fixed. nvm puts node in
The result of every success Installed "[email protected]" with binaries:
- create-react-app
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
error Command failed.
Exit code: 1
Command: C:\Program Files\nodejs\bin\create-react-app npm/npx doesn't have this problem. |
I have a fix and proposed solution for this! Solution for the meantime: First, run these commands It'll output something like: Copy those, and next run this, with slight modification according to your username Firstname: This is not a workaround, this is a fix, and other workarounds that revolves around moving your Yarn configs to a new folder may cause PATH or Environment Variables issue! Hope this fixes your problem. |
@ZombieChibiXD's solution did not work for me, but combining their solution with the solution proposed over at vitejs/create-vite-app#23 (comment) for npm did. Problematic path used as example: Steps taken:
Take note of the output, as stated in the comment above, they will look something like this:
Hope this helps anyone 🙂 |
@ZombieChibiXD's solution looks fancy, but it doesn't work for everyone. The right way to find the short path should be running It's |
After hours of struggling with this issue, @ZombieChibiXD solution worked for me. |
HOW? |
This is happening to me too .... :( My laptop is a company laptop with was pre--setup by someone else, who wasnt aware of spaces being a problem. Is there any fix for this? Edit: Just for info, #6851 (comment) worked for me too. |
I too am amazed to find this is still a problem in 2022. On Windows we've regularly had spaces in directory names since Windows 95, and on Linux the first ext file system had it since 1992. This should not still be a problem 27/30 years later. Many of the workarounds above will not work because the Yarn configuration file ".yarnrc" exists in our user home directory which is a very common place for a space to be present at, so any configuration change you make (even with the junction or symbolic link approach) will not persist. |
just run these two command and confirm changes using this command Thank me later <3 |
Yarn v1.12.3
my laptop (helpfully, thank you windows) installed yarn by default in a directory where the file path includes a space (e.g. C:/Users/Some Name/AppData/Yarn...).
This results in the following error when I run yarn create react-app
The text was updated successfully, but these errors were encountered: