-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Asking for nvm to be installed, when it is already #133521
Comments
Confirming I'm also having this issue after updating to 1.60.1. |
What's the value of the NVM_HOME environment variable, and does it exist? |
Hi! There's no NVM_HOME, but there is an NVM_DIR (I run that at the end here):
|
Hm, ok. If you remove the If that isn't set, where do you have nvm configured? (Which .rc file?) |
If I remove runtime version and console from the launch file again, it still won't run (with the same error).
So I added a .nvmrc file to my repo:
Still the same error when I run VsCode debugging tho:(. Btw, this is my .bashrc config:
|
@bpasero how does environment variable resolution for the extension host work now? Could the NVM_DIR in their bashrc not be picked up for some reason or another? |
@connor4312 via this service call: vscode/src/vs/workbench/services/extensions/electron-browser/localProcessExtensionHost.ts Line 209 in a0a448f
|
Encountered this problem as well. It was introduced in v1.60.0, and I have found no solution other than to downgrade to v1.59.1 |
Do you happen to have nvs also installed? I'm not able to reproduce this on my machine, and the code js-debug uses is almost identical to the old debugger. It would be super helpful if someone could step through the code here to see what's happening on their machine and why it's not being detected: https://github.com/microsoft/vscode-js-debug/blob/db286867c4d6b797304a5a0ef05cce01c3c35b08/src/targets/node/nvmResolver.ts#L51. Contributing guide here for setup info. |
I have the same issue and nvs is not installed on my system. |
I also don't have nvs installed. And I'm not using Windows(as that code mentions), but a MacOS. |
|
That is the issue for you. I'm not sure why 1.60 started failing as both the old and new debuggers depend on NVM_DIR. |
I have NVM_DIR set up and it's still failing |
@dcastellanos-r7 @Anshorei @Jkovarik are you guys also on MacOS or what operating system is this issue showing on for you? |
I'm having this issue with macOS Big Sur 11.6 and VS Code 1.61.1. I have nvm installed and $NVM_DIR set up. |
I have the same issue with the following setup:
|
I was able to make it work using macOS BigSur V11.6 (VSCode June 2021 (version 1.58))
Since the reported behavior is suddenly happening on different versions, the bug trigger should rely somewhere else. I was debugging normally until 2021-10-29. On 2021-10-31 I experienced the issue. Checking the System Information -> Software -> Logs there is no registry of updates in between the dates. Apparently, NPM is being ignored and only the NVS is accepted to resolve the runtimeVersion property in the launch.json file. |
So am I understanding that despite the error itself saying "nvm or nvs", we must now migrate from NVM to NVS (even if just a "work-around")? Windows 10, 20H2 |
Since I have been unable to reproduce this on any of my machines, I'm once again asking for a volunteer to debug through the detection logic to see where nvm detection is failing in their environment: #133521 (comment) |
I have the nightly extension installed and I tried to add breakpoints by function name ( resolveNvmVersionPath ), but it's not hit when I try to launch and I'm not sure how to locate/open the appropriate file to put a breakpoint there. More guidance would be appreciated. I'm also available for real-time (zoom, teams, slack, twitter, etc..) and for a bit at: https://prod.liveshare.vsengsaas.visualstudio.com/join%3FCE7985D1F49CC05A1DC9CB0E585D381CE9AD |
@rainabba the steps are:
If you have an email and preferred time I could also set up a 15 minute teams call to help debug and get to the bottom of it 🙂 |
Steps I've completed:
After that, my breakpoint shows as unbound (empty circle) and if I try to launch my config as before, I get the same error about Here's what I get in the debug console of the vscode-js-debug instance:
I'm available for the next few hours if you'd like to connect. I'll try to keep on top of gmail, but I'm available on chat and duo with the same address. |
Please send a mail over to connor@xbox.com and I'll make a Teams invite for you 🙂 |
@bpasero do you know whether there was a change in 1.61 that adjusted how variables are loaded? What we saw with @rainabba is that he had a somewhat weird shell setup that he booted into zshrc manually (if I recall). Launching code from zsh once loaded worked, but opening the WSL workspace via Recently Opened from a Windows-launched didn't. This would make sense with what I'm seeing where a properly-installed nvm in, for example, a fresh Linux VM works just fine and follows the code paths that have been almost identical for a long time. |
@connor4312 is very politely saying that my shell is broken and so launching vscode from a Windows shortcut (even if to a workspace that "opens in wsl"), the environment was different than if I start a terminal, run bash and THEN I think the takeaway for me was: Make sure vscode is launched from a properly loaded environment BEFORE trying to launch a debug config. This both preventing debugging, AND debugging the debugging hehe. |
@connor4312 one change that comes to mind is that on macOS we launch VS Code via the |
Yes, this user was on macOS. We also have a couple reports from Linux further up in the thread, but I'm not sure how representative Michael's case is of the overall issue. A workaround would just be to check for the default install directory |
If you can distill a bug with steps how to reproduce, we can look into and see if it is related to the change to use |
I was totally stuck here on MacOS with NVM installed. Same error as above. Updated VSCode to Version: 1.62.0 and restart VSCode. Not sure what you guys did, but issue is resolved here. Many thanks. Version: 1.62.0 Note, I added the details from VSCode after seeing the post from yaronlevi. |
Happens here also: Version: 1.62.0 |
@yaronlevi Not clear at all what you are saying. I have no clue what you mean by "Happens here also:" Is that |
Fyi this is fixed in the nightly build: https://github.com/microsoft/vscode-js-debug#nightly-extension |
macOS Big Sur 11.5.2
VSCode 1.60.1
.vscode/launch.json:
This used to run before. And note that terminal run: "node engineRun.js 3000" works.
But when I run VSCode's "Launch program", with the launch file above, I get:
I do have nvm installed + that node version
The text was updated successfully, but these errors were encountered: