-
-
Notifications
You must be signed in to change notification settings - Fork 886
Description
What version of Oxlint are you using?
0.16.0
What command did you run?
No response
What does your .oxlintrc.json config file look like?
My system/VSCode (Latest MacOS/VSCode) seems to have trouble with the oxc_language_server script. It can't resolve the node command. I have node installed via mise-en-place. NODE_PATH is available in my login shells.
However I can't seem to get the language server to kick-off without editing the node_modules/.bin/oxc_language_server script and giving it a fully qualified path to a node runtime.
My system setup is pretty clean and simple, so I'd be really surprised if others were not running into similar issues.
The PATH's added in the script seem kind of odd - maybe it's because the linter is installed locally in my project?
node_modules/.bin/oxc_language_server
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -z "$NODE_PATH" ]; then
export NODE_PATH="/Users/xxx/repos/xxx/node_modules/.pnpm/oxlint@0.16.0/node_modules/oxlint/bin/node_modules:/Users/xxx/repos/xxx/node_modules/.pnpm/oxlint@0.16.0/node_modules/oxlint/node_modules:/Users/xxx/repos/xxx/node_modules/.pnpm/oxlint@0.16.0/node_modules:/Users/xxx/repos/xxx/node_modules/.pnpm/node_modules"
else
export NODE_PATH="/Users/xxx/repos/xxx/node_modules/.pnpm/oxlint@0.16.0/node_modules/oxlint/bin/node_modules:/Users/xxx/repos/xxx/node_modules/.pnpm/oxlint@0.16.0/node_modules/oxlint/node_modules:/Users/xxx/repos/xxx/node_modules/.pnpm/oxlint@0.16.0/node_modules:/Users/xxx/repos/xxx/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../oxlint/bin/oxc_language_server" "$@"
else
exec node "$basedir/../oxlint/bin/oxc_language_server" "$@"
fiWhat happened?
Output
2025-03-20 08:26:06.567 [info] [Trace - 8:26:06 AM] Sending request 'initialize - (0)'.
2025-03-20 08:26:06.603 [info] [Error - 8:26:06 AM] Server process exited with code 0.
2025-03-20 08:26:06.724 [info] /Users/xxx/repos/xxx/node_modules/.bin/oxc_language_server: line 16: exec: node: not found
2025-03-20 08:26:06.724 [info] [Error - 8:26:06 AM] Server process exited with code 127.
2025-03-20 08:26:06.725 [info] [Error - 8:26:06 AM] Server initialization failed.
Shout out
Just want to say thanks to everyone contributing to this project. Outside of having some issues getting the LSP setup this does not feel like beta software at all. The linter is incredible.