-
-
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
nvm-windows not working on Windows 10/64/UAC: popup message but no symlink gets created #281
Comments
Post ScriptumAfter re-installing nvm-windows (WITHOUT uninstalling it first!), the 🤐 Though this may sound good, I don't like this 'magic disappearance' of the problem as it means this can happen again on any other box or when I wipe and re-install Windows on this box at some point (happens about once a year for me; call it "Annual Spring Cleaning After Major Screw-Up" ;-) ). |
I see this issue as well, and tried installing nvm-windows twice (without uninstalling it between installs), and it does not solve the issue for me. I have not tried your powershell scripts, but I suspect something in there actually solved the issue for you, not the re-installing. Could be wrong, though, so this is just a FYI. |
I have seen this error when attempting to run from Git Bash. Works fine when run from cmd.exe. |
Yes, I have tried to invoke nvm from git-bash, and hit the issue then.
*however*, I also tried running it from a `cmd` shell which itself was
started from a git-bash shell and there the troubles were the same.
then ditto for `powershell` from git-bash to run `nvm` from inside that
one: no go.
After that, running `nvm` from a `cmd` shell started straight from the
Windows Start menu also produced this issue.
After that I got frustrated and went looking for the reason why those
popups kept nagging me without ever giving me an option to accept and
transition into administrator mode via the usual UAC process (popup to
accet yes.no and click yes to execute command)
I don't know *exactly* what made it go away in the end; I fear I've somehow
'magically' twiddled some obscure security bit in the `C:\Program Files\`
directory tree while testing several ways to get that darn `mklink` command
working (and deleting the manual attempts which succeeded). I have not
explicitly edited the security settings of said directory along the way,
but sometimes Windows throws me a curve ball that I cannot explain... and
this is one of those occasions, unfortunately. :-((
I listed those powershell commands in case someone else runs into this
trouble and travels a similar looking-for-ways-out path like me: the 'fun'
bit here is that many websites', including many stackoverflow answers, did
not deliver on my machine: I cobbled those powershell commands together
after several failed copy-paste attempts from those google search results.
Met vriendelijke groeten / Best regards,
Ger Hobbelt
…--------------------------------------------------
web: http://www.hobbelt.com/
http://www.hebbut.net/
mail: ger@hobbelt.com
mobile: +31-6-11 120 978
--------------------------------------------------
On Fri, Jun 23, 2017 at 8:58 PM, Chris Pizzurro ***@***.***> wrote:
I have seen this error when attempting to run from Git Bash. Works fine
when run from cmd.exe.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#281 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAYkHgLUxY12Zy8h9YkuPMpYZdftkOazks5sHArngaJpZM4OBJeW>
.
|
@GerHobbelt - first off, I'm sorry you've had such troubles with this. Unfortunately, many of the third party shells do not respect standard commands. Cygwin and git-bash are particularly bad about this. Sadly, I'm not sure why you weren't getting the UAC prompt. The OS determines when to display the prompt, so this is definitely perplexing. I haven't been able to replicate the issue. Thank you very much for posting the resources and your research. If I can find some time, I will try to curate all of the different experiences users have posted and try to make a troubleshooting guide. Unfortunately, I've got 4 client projects and a product release... so it may be awhile before I can do this. I'm going to keep this thread open for comments. If anyone tracks down an issue/work around for a particular shell, I will add it to the wiki until a formal guide can be made. |
I am having this issue from cmd and Powershell too, without using Cmder (which is my default way to use terminals on windows) |
can confirm that reinstalling fixes the issue |
The Go version used for the repository development could not be found so the latest installation available was used. In doing so, some compile time errors appeared with regards to filepath and the Unzip function that had to be corrected. The Go exec module wraps the os.StartProcess functionality. The initial argument escaping appears to be correct, however, during the pipe writing when actually starting the process the command is escaped again in quotations making the command invalid. This makes the command fail and no symlink is created. This was verified by printing the resulting argument string by utilizing the same logic that makes the command line argument and escapes it. As this appears to be a Go library issue, a different tactic was attempted. In case of this failure, a backup mechanism has been put in place to use the os module to create the symlink directly. After much deliberation it was decided this backup mechanism should only be attempted when the initial attempt fails. The reasoning behind this is because the initial command request attempts to elevate the command which would give access to create the symbolic link in "Program Files", which is otherwise a protected folder. The os call could fail here due to insufficient permissions. Potentially fixes: coreybutler#281, coreybutler#266, coreybutler#30
I'm also seeing UAC prompts in Windows 10 64-bit Fall Creators Update (1709) when switching between node versions with nvm. During install nvm-windows found two versions of node, v4.1.1 and v6.10.3. Tried installing a second time (without uninstalling first) and it found just v6.10.3 and gave an additional prompt (I think it was about deleting node_modules) that did not happen the first time. Uninstalled nvm which removed all my node versions. Installed nvm again which did not detect any node versions. nvm installed an 8 and 6 version. Still required two UAC prompts to switch versions. |
I met this issue today. It worked well 3 month ago, but suddenly |
My Environment
I have already...
My issue is related to (check only those which apply):
Expected Behavior
UAC should pop up with a dialog to allow me to accept the changes (symlink creation) after having invoked
nvm use x.y.z
Actual Behavior
nvm use x.y.z
shows this dialog box twice in a row and doesn't create/update the symlink necessary to make node+npm work.Steps to reproduce the problem:
nvm version
=1.1.5
).nvm install 8
nvm install 7
nvm on
nvm use 8
--> pops up dialog as shown in the screenshot. No working node.
Hack / solution path
Failure Diagnosis
Using SysInternals ProcExp it turns out that this command is failing:
Problem solution (experimental)
As elevate.vbs doesn't deliver on my platform as is (when using
cmd
to executemklink
), this command line however DOES work as expected/desired (popping up a UAC accept dialog):These two command lines (to nuke any existing symlink and then re-establish it) work on my platform:
References for the above command lines
In more or less reverse order of having visited these (i.e. first entry was visited last):
Possibly related issues
nvm use
#58The text was updated successfully, but these errors were encountered: