Skip to content
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

exit status 1: Access is denied. #780

Closed
olignyf opened this issue Mar 30, 2022 · 11 comments
Closed

exit status 1: Access is denied. #780

olignyf opened this issue Mar 30, 2022 · 11 comments
Labels
consider for rt Pinned for use in the rt project duplicate edge case

Comments

@olignyf
Copy link

olignyf commented Mar 30, 2022

How To Reproduce:
Windows 10
An old nvm installation working correctly. (not sure of the version I had, 1.1.7 ?)
Close Visual Studio Code.
Try to upgrade this old nvm with nvm-update.zip
After apparently a successful upgrade occurs but now nothing works anymore with node and it complains of permissions errors.
Uninstall nvm from Windows using the Settings > Apps & features / Add or remove programs
Install 1.1.9 from nvm-setup.zip
Re-launch Visual Studio Code
nvm install 16.14.2
nvm use 16.14.2 <= this fails with access is denied
exit status 1: Access is denied.

Actual Result
exit status 1: Access is denied.

Expected Behavior:
No access is denied error

@olignyf
Copy link
Author

olignyf commented Mar 30, 2022

Ah I guess this is an expected change after 1.1.7
https://github.com/coreybutler/nvm-windows/wiki/Common-Issues#permissions-exit-1-exit-5-access-denied-exit-145

Doesn't running Windows in Developer mode presenting more security risks than before using 1.1.7 without it?

@olignyf
Copy link
Author

olignyf commented Mar 30, 2022

By popular demand, NVM4W 1.1.8 introduced support for developer mode. In other words, you won't receive a UAC prompt to elevate permissions if it's not explicitly necessary.

How come when I run "nvm use xyz" in Visual Studio Code I am not prompted for UAC and instead it fails. I think if it the command fails it was explicitly necessary, yet I was not prompted?

@ojintoad
Copy link

These symptoms all sound like they're versions of #767

@coreybutler coreybutler added duplicate edge case consider for rt Pinned for use in the rt project labels Apr 5, 2022
@coreybutler
Copy link
Owner

VS Code won't run anything as an admin unless it is opened with an account that has admin privileges. This is more of a problem of VS Code than with NVM4W. The UAC prompts were a workaround for VS Code, so use NVM v1.1.7 if you need this capability in VS Code. I'm planning to bring UAC prompts back in rt, so I'm tryin to avoid further changes in NVM4W.

I'm closing this, in part because it's a duplicate of #717 and in part because there isn't anything that can be done specifically for VS Code other than reverting back to UAC prompts.

@patricknelson
Copy link

I'm having this issue now after updating. The problem is I run this on a corporate-owned computer and even getting privileges to run anything as an admin is already a routine struggle on its own. Also, there is no "Developers" settings page in Windows 10 for me, so not sure what that is.

The UAC prompts were ideal because I could just run it in my existing terminal and wasn't forced to have to open a totally separate elevated cmd.exe prompt (which stinks for me since I strongly prefer Windows Terminal with bash). Is there a discussion/PR/issue for this change? I'd love to add my vote there to at least have UAC capability since the alternative doesn't appear to be viable for me.

@patricknelson
Copy link

Since at least the UAC dialog is far better than being rejected with a vague "access is denied" error 😕

image

@dsaw
Copy link

dsaw commented May 19, 2022

same issue. i could bypass it by running PowerShell with admin privileges, but its not really ideal as @patricknelson states.

@quantrpeter
Copy link

powershell with admin role also failed
image

@coreybutler
Copy link
Owner

@quantrpeter - that is not the same issue. That is a download failure. The npm repo for 6.14.17 has a bad link.

@olignyf
Copy link
Author

olignyf commented Nov 3, 2022

@coreybutler The thing is that it's still a problem. NVM 1.1.7 cannot install node versions above 16.13.2. And if upgrading NVM to 1.1.9, then UAC is broken.
Also I'm seeing new people getting introduced to Node and the first error they come across are permission denied without being prompted for elevated credentials (UAC dialog). It's not an edge case. Also the issue was closed partially because it's duplicated but both issues have been closed without resolution.
I'm wondering if this could be fixed in a 1.1.10 release please? Thanks

@olignyf
Copy link
Author

olignyf commented Nov 3, 2022

@coreybutler I just noticed you did exactly that in 1.1.10 and fixed UAC. So this ticket can be considered fixed and maybe the tag "edge case" removed considering the release notes mentioning "Many users have requested UAC prompts be reinstated."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consider for rt Pinned for use in the rt project duplicate edge case
Projects
None yet
Development

No branches or pull requests

6 participants