-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Issue with blank spaces in path #41
Comments
+1 Workaround for me was to uninstall and then reinstall for |
+1 many windows installs have user names with spaces |
@coreybutler can we please have a fix for this, please please please? 🙏 🙏 🙏 🙏 🙏 🙏 🙏 🙏 🙏 🙏 🙏 🙏 🙏 here's a gif to try and co-coerce you... |
My build environment has changed recently/substantially, so the problem is releasing the binaries (I had a really customized build script). I'd be happy to add the fix to the master branch, it would just require building from source. I have to head to the UK next week, but when I return to the US I'll address this as soon as I can. |
That would be lovely @coreybutler :) Also, maybe we can link the next build (with this patch) to #17 etc? |
I was having this problem because it wanted to use "C:\Documents and Settings(my name)\Application Data\nvm" as the root. So what I did was reinstall nvm, specifying "C:" as the root instead of the default during the install, so it's now storing all the versions of Node in "C:\nvm", which of course has no spaces in the path. Settings.txt confirms this as the root. I just needed to remember to cd to C:\ before using any of the nvm commands, else it threw an error saying it can't find settings.txt. In my case, since C:\ isn't associated with any one user, when I switch to a version of Node using "nvm use <version>" it asks me which user account I want to use to run the program. But it seems to be running fine; I'm getting the "now using node <version>" message. |
+1 For anyone wanting to do the workaround editting the settings.txt you can try this from command line to get the correct formatted path cmd /c for %A in ("C:\Users\My Name With Spaces\AppData\Roaming\nvm") do @echo %~sA |
Installing nvm-windows into Program Files also causes this error. Updating settings.txt as below resolves the issue, but it would be nice to get this fixed, or added to the ReadMe as a 'Gotcha'! root: C:\PROGRA |
using a symbolic junction link on windows i found is a suitable workaround to this problem as well then up date settings.txt with the junction address once i created this link switching started working with out any problems |
So this issue has been open for almost a year. Is nvm-windows dead? |
@codeimpossible - Not dead, I've just had higher life priorities to deal with. I'll post a note about it in gitter. |
@coreybutler just wanted to let you know I use |
@kirkouimet Thanks... thrilled to hear it is helpful! |
Hi coreybutler, great job with nvm. This is really making my life easier :D But can you write anywhere info about the space? Something like "If you have a space in your user name change default directory used by the installer and choose path without a space." I have never edit wiki on github. I have a little fear what I can do. |
@AntiCZ - Good idea. I added a common issues page to address this. I'll continue to add to this as neccessary. |
I solve mine using: |
Without a space in I'm going to test with a user with a space in the name to see if that is causing a cascading failure of some sort. It would be great to get some OS versions and which cmd prompt you are using (PowerShell/CMD/Bash4Windows/GitBash). Right now I'm refactoring a Chocolatey package somebody created for nvm and hope to publish it soon. It avoids the installer and uses the chocolatey install path which doesn't have spaces, and I haven't had any issues with the node path having spaces in the settings.txt file. |
I had almost this same issue, except my user name has an ampersand (&) instead of a space. In this situation, using the alternate folder name didn't help, because even the short name still has the ampersand. However, creating a symbolic link, as @clmcgrath suggested, was a good workaround for me. |
Just install it to a directory without anything special. For example: C:\nvm\ |
A quick note for those lacking general tech ability like me. If you use |
which website provide ionic related latest tutorial.? please tell me.....
… |
how is this issue still not fixed?! If it is a regression in 1.1.7, maybe think about adding a few integration/unit/regression tests to cover the not-so-uncommon case of spaces in windows (or linux for that matter) path names before releasing it... Do you guys need support on this or is there already someone actively working on this? |
@julian-becker, first off I'd like to call you out your aggressive start:
It's rude. Folks in the open source community don't owe you any of their time or attention. What makes your spare time any more precious than the maintainers, or ours? It seems like you didn't spend the time to see that @coreybutler has already answered your question here:
You also missed the solution and fork that @s-h-a-d-o-w shared. Second, you've got a great game plan for how this should be done. Do it! If you've got the time, everyone watching this issue will appreciate it being fixed. Have a look at what @s-h-a-d-o-w has done, add the tests, get a PR going, and reach out here for help with the code-review. Someone is self-interested enough to help get'r done. Good luck, and reach out here if you need some help! 👏 |
To avoid possible confusion and work being done twice, I'd like to note that my fix was already merged, it's just a matter of actually releasing it. |
Perfect! I didn't have that much time to read either. 😆 |
@s-h-a-d-o-w Just ran into this problem again, any idea when it will be released? |
@coreybutler Would you mind linking to the release in my fork in a final post here and then locking this thread? I don't think that there is a need to discuss it further... |
@coreybutler may it be possible to do the release? |
Please release this :) |
Using the fork released by s-h-a-d-o-w (see link above) worked for me as the only thing. Big thanks! |
I've linked to @s-h-a-d-o-w 's release in common issues. Sorry it is taking me so long to cut a release. I know it seems straightforward, but time has been brutal for me. Maybe I'll write about it someday. |
1.In cmd, go to your home directory and type dir/x to see the shortened name for this folder |
Thanks a lot this thing saved my life. |
Solved!!For someone who is not able to work with ~1 method by @kirkouimet (Thanks mate) and type >
|
Thank you, everyone, that suggested the settings.txt solution but specially Swarag-N for such a thorough explanation. I am glad I landed here and not changed my user profile folder name. |
Please check this page, it works for me |
This worked for me. Thank you! To do this, basically you have to: |
Is there a way for nvm to be installed into program files? My org has policies set only allowing applications to be installed in there |
@BrandonEdlin yes. You have a choice. Your organization can also create their own installer if they prefer. See this guide. |
Hello! I'm having a problem when i'm trying
nvm use <node_version>
Sorry for the spanish language in screenshot. It means "c:\Users\Edu" is not recognise as an internal command... bla bla bla.
My user name is "Edu Martin" and my path is "c:\Users\Edu Martin\AppData\Roaming\nvm"
Is it possible to be an error with black spaces in the path?? All settings in my app are standard
The text was updated successfully, but these errors were encountered: