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

🐛 Can't use VSCode extension (node not found) #19

Closed
1 task done
hyoretsu opened this issue Sep 18, 2023 · 18 comments
Closed
1 task done

🐛 Can't use VSCode extension (node not found) #19

hyoretsu opened this issue Sep 18, 2023 · 18 comments

Comments

@hyoretsu
Copy link

Environment information

CLI:
  Version:                      1.2.2
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v18.15.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "pnpm/8.6.10"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

What happened?

I can run it from the CLI just fine, but the extension throws this error:

Configuration file required, looking for one.
Config file found at /home/hyoretsu/@Projects/maple-simulator/biome.json, enabling Biome extension
Using Biome from /home/hyoretsu/@Projects/maple-simulator/node_modules/.bin/biome
[cli] exit 127
[cli-stderr] data 92
[cli-stderr] end
[cli-stdout] end
[Error - 12:33:39 PM] Biome client: couldn't create connection to server.
Error: Command "/home/hyoretsu/@Projects/maple-simulator/node_modules/.bin/biome __print_socket" exited with code 127
Output:
/home/hyoretsu/@Projects/maple-simulator/node_modules/.bin/biome: 16: exec: node: not found

    at getSocket (/home/hyoretsu/.vscode-server/extensions/biomejs.biome-1.4.2-linux-x64/out/main.js:19600:11)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at createMessageTransports (/home/hyoretsu/.vscode-server/extensions/biomejs.biome-1.4.2-linux-x64/out/main.js:19615:16)
    at LanguageClient2.createConnection (/home/hyoretsu/.vscode-server/extensions/biomejs.biome-1.4.2-linux-x64/out/main.js:15576:28)
    at LanguageClient2.start (/home/hyoretsu/.vscode-server/extensions/biomejs.biome-1.4.2-linux-x64/out/main.js:15152:30)
    at activate (/home/hyoretsu/.vscode-server/extensions/biomejs.biome-1.4.2-linux-x64/out/main.js:19421:3)
    at p.n (/home/hyoretsu/.vscode-server/bin/6c3e3dba23e8fadc360aed75ce363ba185c49794/out/vs/workbench/api/node/extensionHostProcess.js:103:6206)
    at p.m (/home/hyoretsu/.vscode-server/bin/6c3e3dba23e8fadc360aed75ce363ba185c49794/out/vs/workbench/api/node/extensionHostProcess.js:103:6169)
    at p.l (/home/hyoretsu/.vscode-server/bin/6c3e3dba23e8fadc360aed75ce363ba185c49794/out/vs/workbench/api/node/extensionHostProcess.js:103:5626)
[cli-stdout] close
[cli] close 127
[cli-stderr] close

Expected result

It should work just fine.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@ematipico
Copy link
Member

Is your OS supported? I saw this error before, most of the time it's because Biome runs on an OS that is not supported

@hyoretsu
Copy link
Author

hyoretsu commented Sep 18, 2023

It definitely is, I'm running Ubuntu (on WSL) I also don't think running VSCode Remote on WSL2 messes something up.

@erictaylor
Copy link

erictaylor commented Sep 19, 2023

I rolled back to 1.2.1 which works, but 1.2.2 is giving me the same issue on macOS. nvm it doesn't work

@Mirasaki
Copy link

Starting using Biome in Bun environments and it ran mostly fine, tried to adopt it in a NodeJS environment (running on WSL2 Ubuntu) and running into the same error (exit code 127):

/mnt/c/Users/31645/AppData/Roaming/npm/node: 8: /mnt/c/Users/31645/AppData/Roaming/npm/node_modules/node/bin/node: not found

	at getSocket (/home/mirasaki/.vscode-server/extensions/biomejs.biome-1.4.2-linux-x64/out/main.js:19600:11)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async createMessageTransports (/home/mirasaki/.vscode-server/extensions/biomejs.biome-1.4.2-linux-x64/out/main.js:19615:16)
	at async LanguageClient2.createConnection (/home/mirasaki/.vscode-server/extensions/biomejs.biome-1.4.2-linux-x64/out/main.js:15576:28)
	at async LanguageClient2.start (/home/mirasaki/.vscode-server/extensions/biomejs.biome-1.4.2-linux-x64/out/main.js:15152:30)
	at async activate (/home/mirasaki/.vscode-server/extensions/biomejs.biome-1.4.2-linux-x64/out/main.js:19421:3)
	at async E.n (/home/mirasaki/.vscode-server/bin/abd2f3db4bdb28f9e95536dfa84d8479f1eb312d/out/vs/workbench/api/node/extensionHostProcess.js:108:6206)
	at async E.m (/home/mirasaki/.vscode-server/bin/abd2f3db4bdb28f9e95536dfa84d8479f1eb312d/out/vs/workbench/api/node/extensionHostProcess.js:108:6169)
	at async E.l (/home/mirasaki/.vscode-server/bin/abd2f3db4bdb28f9e95536dfa84d8479f1eb312d/out/vs/workbench/api/node/extensionHostProcess.js:108:5626)
node -v
v19.0.1

@bkniffler
Copy link

Is there a way to run vscode extension with bun?

@ematipico
Copy link
Member

Is there a way to run vscode extension with bun?

We don't have a bun script with the bun shebang, but if you're interested we welcome any PR to do so

@bkniffler
Copy link

@ematipico unfortunately vscode languageclient does not yet support bun as a runtime microsoft/vscode-languageserver-node#1321

I'll try submit a PR on biome once there is advances on vscode.

@ematipico
Copy link
Member

Related to biomejs/biome#412

@hyoretsu have you tried this? ⬆️

@varna
Copy link

varna commented Oct 4, 2023

Same problem on macOS 13.5.2 (22G91) with node v18.13.0 (via nvm).

@hyoretsu
Copy link
Author

hyoretsu commented Oct 4, 2023

Related to biomejs/biome#412

@hyoretsu have you tried this? ⬆️

It didn't work, I tried restarting both WSL and my computer.

@nhedger
Copy link
Member

nhedger commented Oct 6, 2023

Hey 👋, this issue may be fixed in the latest nightly version.

Could you try it and tell us if you're still experiencing the issue?

Here's the command to install the nightly version

code --install-extension [email protected]

After your tests, you can revert to the current stable version with the following command.

code --install-extension [email protected]

@Mirasaki
Copy link

This was not fixed 4 days ago for me (not speaking for anyone else), but a couple of hours ago with the most recent VSCode update. I'm not sure if VSCode updates also bump all the plugins to their latest versions, or if this was released in a non-nightly version - but it's definitely fixed, amazing! 🥳

@nhedger
Copy link
Member

nhedger commented Oct 10, 2023

@Mirasaki, could you tell which version you’re currently on ?

@Mirasaki
Copy link

Biome 1.2.2
And VSCode 1.83.0
Code_JLjvYFlGnN

It actually looks like the last local VSCode update was a week ago, so I'm not sure of anything anymore relating this haha. Except that it still works. Sometimes it loses the connection to the server, but very quickly recovers.

@BoscoDomingo
Copy link

BoscoDomingo commented Nov 24, 2023

Biome doesn't work for me either in WSL. Funnily enough, it isn't working on Windows either, when both Prettier and ESLint do, and I have installed biome both in the local as well as the global environments. I've tried with Node 18 and 20, no luck. VS Code is up to date

Edit: It's because my config file is inside the ./configs/ folder, instead of in the root. Could we add support for this?

@ematipico
Copy link
Member

@BoscoDomingo you might want to open a different issue/discussion in the biome-vscode repository, and propose the feature

@BoscoDomingo
Copy link

@BoscoDomingo you might want to open a different issue/discussion in the biome-vscode repository, and propose the feature

Yup, did so right after editing the comment. Thanks!

@nhedger nhedger transferred this issue from biomejs/biome Nov 26, 2023
@nhedger
Copy link
Member

nhedger commented Nov 26, 2023

I believe this issue has been fixed in a previous release of the extension.

I'll close the issue to keep the repo tidy, but feel free to reopen it if you reencounter it.

Thanks!

@nhedger nhedger closed this as completed Nov 26, 2023
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

8 participants