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

Node version not detected correctly on WSL2 #2522

Closed
ghost opened this issue Dec 11, 2019 · 4 comments
Closed

Node version not detected correctly on WSL2 #2522

ghost opened this issue Dec 11, 2019 · 4 comments

Comments

@ghost
Copy link

ghost commented Dec 11, 2019

I'm trying to install rust analyzer vscode extension from WSL2 (Ubuntu 18.04), but I get an error message about needing node > 10.x.

will run: code-insiders --list-extensions
Ignoring option list-extensions: not supported for code-insiders.
Error: install client

Caused by:
    Could not install the Visual Studio Code extension. Please make sure you have at least NodeJS 10.x installed and try again.

however I have node v12.13.1 in my Windows path and v13.3.0 in WSL.

Full output;

me@DESKTOP-V0B6ATR:~/builds/rust-analyzer$ cargo xtask install
    Finished dev [unoptimized] target(s) in 0.08s
     Running `target/debug/xtask install`

will run: cargo --version
cargo 1.39.0 (1c6ec66d5 2019-09-30)


will run: cargo install --path crates/ra_lsp_server --locked --force
  Installing ra_lsp_server v0.1.0 (/home/tpb/builds/rust-analyzer/crates/ra_lsp_server)
    Updating crates.io index
    Finished release [optimized] target(s) in 1.20s
   Replacing /home/tpb/.cargo/bin/ra_lsp_server
    Replaced package `ra_lsp_server v0.1.0 (/home/tpb/builds/rust-analyzer/crates/ra_lsp_server)` with `ra_lsp_server v0.1.0 (/home/tpb/builds/rust-analyzer/crates/ra_lsp_server)` (executable `ra_lsp_server`)

will run: npm --version
6.13.1

will run: npm install
audited 451 packages in 1.517s

6 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities


will run: npm run package --scripts-prepend-node-path

> ra-lsp@0.0.1 package /home/tpb/builds/rust-analyzer/editors/code
> vsce package

Executing prepublish script 'npm run vscode:prepublish'...

> ra-lsp@0.0.1 vscode:prepublish /home/tpb/builds/rust-analyzer/editors/code
> npm run compile


> ra-lsp@0.0.1 compile /home/tpb/builds/rust-analyzer/editors/code
> rollup -c && shx cp src/utils/terminateProcess.sh bundle/terminateProcess.sh


./src/extension.ts → ./bundle/extension.js...
(!) Circular dependencies
src/server.ts -> src/config.ts -> src/server.ts
src/server.ts -> src/highlighting.ts -> src/server.ts
src/utils/diagnostics/rust.ts -> src/utils/diagnostics/SuggestedFix.ts -> src/utils/diagnostics/rust.ts
created ./bundle/extension.js in 2.9s
 DONE  Packaged: /home/tpb/builds/rust-analyzer/editors/code/ra-lsp-0.0.1.vsix (8 files, 240.67KB)
 INFO
The latest version of vsce is 1.71.0 and you have 1.70.0.
Update it now: npm install -g vsce

will run: code --version

will run: code-insiders --version
1.41.0-insider
bef029a9d21904c0085c4e8ef1335d9c33a28fa4
x64

will run: code-insiders --install-extension ./ra-lsp-0.0.1.vsix --force
Ignoring option install-extension: not supported for code-insiders.

will run: code-insiders --list-extensions
Ignoring option list-extensions: not supported for code-insiders.
Error: install client

Caused by:
    Could not install the Visual Studio Code extension. Please make sure you have at least NodeJS 10.x installed and try again.
@lnicola
Copy link
Member

lnicola commented Dec 11, 2019

will run: code-insiders --list-extensions
Ignoring option list-extensions: not supported for code-insiders.

That sounds like a Code (--list-extensions works in 1.40), not node.js problem.

@matklad
Copy link
Member

matklad commented Dec 11, 2019

cc microsoft/vscode-remote-release#385

Not sure what's going on here, we probably need to either change our installation instructions, or to provide a better error message. The relevant code is here:

https://github.com/rust-analyzer/rust-analyzer/blob/ee904594af174866cfa10474fd8fd3f23580b6af/xtask/src/main.rs#L173-L234

I personally won't be able to look into this anytime soon

@ghost
Copy link
Author

ghost commented Dec 11, 2019

I see now I just missed the existing instructions for installing on vscode on a remote host. A relevant error message for someone using the wrong install method would be great though.

bors bot added a commit that referenced this issue Mar 2, 2020
3389: Note vscode remote limitation when client install fails r=matklad a=not-much-io

Just adding a note about the limitation referenced in #2522 

Considered checking if this message is relevant in the context (is this remote?) but decided against it because of return on investment - seeing how fast vscode iterates this limitation might just disappear in the near future.

Also checked if there is a way to already do this which lead me to leaving a specifing question at microsoft/vscode-remote-release#385 

Co-authored-by: nmio <kristo.koert@gmail.com>
@lnicola
Copy link
Member

lnicola commented Dec 21, 2020

Presumably fixed in #3389.

@lnicola lnicola closed this as completed Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants