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

[windows] Eslint Lsp fail to load #19709

Open
1 task done
799189288 opened this issue Oct 25, 2024 · 12 comments
Open
1 task done

[windows] Eslint Lsp fail to load #19709

799189288 opened this issue Oct 25, 2024 · 12 comments
Labels
bug [core label] eslint ESLint tooling support javascript JavaScript programming language support language An umbrella label for all programming languages syntax behaviors tooling An umbrella label for language tools, linters, formatters, etc typescript TypeScript programming language support

Comments

@799189288
Copy link

799189288 commented Oct 25, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Language server error: eslint

oneshot canceled
-- stderr--
node:internal/modules/cjs/loader:1222
throw err;
^

Error: Cannot find module 'C:\Users\79918\AppData\Local\Zed\languages\eslint\vscode-eslint-2.4.4\vscode-eslint\server\out\eslintServer.js'
at Module._resolveFilename (node:internal/modules/cjs/loader:1219:15)
at Module._load (node:internal/modules/cjs/loader:1045:27)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:215:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:158:5)
at node:internal/main/run_main_module:30:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}

Node.js v22.5.1

i checked my file folder, there is no 'out' in vscode-eslint\server

Environment

windows 11 powershell

If applicable, add mockups / screenshots to help explain present your vision of the feature

40c61128-d1ee-4898-b729-ae7d206baa6f

No response

If applicable, attach your Zed.log file to this issue.

Zed.log
@799189288 799189288 added admin read bug [core label] labels Oct 25, 2024
@kineticVis
Copy link

kineticVis commented Oct 28, 2024

Having the same issue on Mac. No out directory in vscode-eslint\server

@JulianCataldo
Copy link

Same on macOS 14.7 23H124 x86_64 and Zed Zed 0.159.6.

Language server error: eslint

oneshot canceled
-- stderr--
node:internal/modules/cjs/loader:1252
  throw err;
  ^

Error: Cannot find module '/Users/***/Library/Application Support/Zed/languages/eslint/vscode-eslint-2.4.4/vscode-eslint/server/out/eslintServer.js'
    at Function._resolveFilename (node:internal/modules/cjs/loader:1249:15)
    at Function._load (node:internal/modules/cjs/loader:1075:27)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
    at node:internal/main/run_main_module:36:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v22.10.0

@JosephTLyons JosephTLyons added windows typescript TypeScript programming language support javascript JavaScript programming language support language An umbrella label for all programming languages syntax behaviors eslint ESLint tooling support tooling An umbrella label for language tools, linters, formatters, etc and removed triage windows labels Nov 1, 2024
@begprod

This comment was marked as spam.

@begprod
Copy link

begprod commented Nov 4, 2024

Fix on macos
cd Users/${your_user_name}/Library/Application Support/Zed/languages/eslint/vscode-eslint-2.4.4/vscode-eslint
npm run webpack

@FleetAdmiralJakob
Copy link

FleetAdmiralJakob commented Nov 24, 2024

Fix on macos cd Users/${your_user_name}/Library/Application Support/Zed/languages/eslint/vscode-eslint-2.4.4/vscode-eslint npm run webpack

Unfortunately your fix does not work for me:

npm run webpack

> vscode-eslint@2.4.4 webpack
> npm run clean && webpack --mode production --config ./client/webpack.config.js && webpack --mode production --config ./server/webpack.config.js


> vscode-eslint@2.4.4 clean
> rimraf client/out && rimraf server/out

[webpack-cli] Failed to load '/Users/dev/Library/Application Support/Zed/languages/eslint/vscode-eslint-2.4.4/vscode-eslint-release-2.4.4/client/webpack.config.js' config
[webpack-cli] Error: Cannot find module '../shared.webpack.config'
Require stack:
- /Users/dev/Library/Application Support/Zed/languages/eslint/vscode-eslint-2.4.4/vscode-eslint-release-2.4.4/client/webpack.config.js
- /Users/dev/Library/Application Support/Zed/languages/eslint/vscode-eslint-2.4.4/vscode-eslint-release-2.4.4/node_modules/webpack-cli/lib/webpack-cli.js
- /Users/dev/Library/Application Support/Zed/languages/eslint/vscode-eslint-2.4.4/vscode-eslint-release-2.4.4/node_modules/webpack-cli/lib/bootstrap.js
- /Users/dev/Library/Application Support/Zed/languages/eslint/vscode-eslint-2.4.4/vscode-eslint-release-2.4.4/node_modules/webpack-cli/bin/cli.js
- /Users/dev/Library/Application Support/Zed/languages/eslint/vscode-eslint-2.4.4/vscode-eslint-release-2.4.4/node_modules/webpack/bin/webpack.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Module._load (node:internal/modules/cjs/loader:1051:27)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/Users/dev/Library/Application Support/Zed/languages/eslint/vscode-eslint-2.4.4/vscode-eslint-release-2.4.4/client/webpack.config.js:10:22)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Module.require (node:internal/modules/cjs/loader:1311:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/dev/Library/Application Support/Zed/languages/eslint/vscode-eslint-2.4.4/vscode-eslint-release-2.4.4/client/webpack.config.js',
    '/Users/dev/Library/Application Support/Zed/languages/eslint/vscode-eslint-2.4.4/vscode-eslint-release-2.4.4/node_modules/webpack-cli/lib/webpack-cli.js',
    '/Users/dev/Library/Application Support/Zed/languages/eslint/vscode-eslint-2.4.4/vscode-eslint-release-2.4.4/node_modules/webpack-cli/lib/bootstrap.js',
    '/Users/dev/Library/Application Support/Zed/languages/eslint/vscode-eslint-2.4.4/vscode-eslint-release-2.4.4/node_modules/webpack-cli/bin/cli.js',
    '/Users/dev/Library/Application Support/Zed/languages/eslint/vscode-eslint-2.4.4/vscode-eslint-release-2.4.4/node_modules/webpack/bin/webpack.js'
  ]
}

@akasakakona
Copy link

akasakakona commented Nov 26, 2024

Same problem on Fedora 41, Zed 0.162.5. There's nothing under vscode-eslint-2.4.4. It's empty.

Edit: I found the solution. Check your vscode-eslint-2.4.4 folder. If it's empty then this can be solved fairly easily.

Upon reading the log, it seems like it failed to fetch the eslint module because this link is just broken:
https://github.com/microsoft/vscode-eslint/archive/refs/tags/release%2F2.4.4.tar.gz

2024-11-26T02:37:26.376128555-07:00 [INFO] downloading language server "eslint"
2024-11-26T02:37:27.809737266-07:00 [INFO] failed to fetch newest version of language server LanguageServerName("eslint"). error: extracting https://github.com/microsoft/vscode-eslint/archive/refs/tags/release%2F2.4.4.tar.gz to "/home/***/.local/share/zed/languages/eslint/vscode-eslint-2.4.4"

So what you need to do is to go to this link instead: https://codeload.github.com/microsoft/vscode-eslint/tar.gz/release/2.4.4 and download the tar.gz file provided.

Go to vscode-eslint-2.4.4 folder, and extract the content of the tar.gz file downloaded into it.

Rename the vscode-eslint-release-2.4.4 folder as vscode-eslint, cd into it, and run the following commands:
npm i
npm audit fix
npm run webpack
and that should fix it.

@FleetAdmiralJakob
Copy link

Same problem on Fedora 41, Zed 0.162.5. There's nothing under vscode-eslint-2.4.4. It's empty.

Edit: I found the solution. Check your vscode-eslint-2.4.4 folder. If it's empty then this can be solved fairly easily.

Upon reading the log, it seems like it failed to fetch the eslint module because this link is just broken: https://github.com/microsoft/vscode-eslint/archive/refs/tags/release%2F2.4.4.tar.gz

2024-11-26T02:37:26.376128555-07:00 [INFO] downloading language server "eslint"
2024-11-26T02:37:27.809737266-07:00 [INFO] failed to fetch newest version of language server LanguageServerName("eslint"). error: extracting https://github.com/microsoft/vscode-eslint/archive/refs/tags/release%2F2.4.4.tar.gz to "/home/***/.local/share/zed/languages/eslint/vscode-eslint-2.4.4"

So what you need to do is to go to this link instead: codeload.github.com/microsoft/vscode-eslint/tar.gz/release/2.4.4 and download the tar.gz file provided.

Go to vscode-eslint-2.4.4 folder, and extract the content of the tar.gz file downloaded into it.

Rename the vscode-eslint-release-2.4.4 folder as vscode-eslint, cd into it, and run the following commands: npm i npm audit fix npm run webpack and that should fix it.

Works even if your folder isn't empty, just delete the folder and paste the new one in there

@devzeth
Copy link
Member

devzeth commented Feb 21, 2025

Hey guys, can you retry with Zed Preview 175.3 or a the latest stable? This might have been fixed already.

@stavalfi
Copy link

Hey guys, can you retry with Zed Preview 175.3 or a the latest stable? This might have been fixed already.

Sorry, it did not:

zed -v
Zed 0.175.3 – /Applications/Zed Preview.app

error:

Language server error: eslint

oneshot canceled
-- stderr--
node:internal/modules/cjs/loader:1252
  throw err;
  ^

Error: Cannot find module '/Users/stava/Library/Application Support/Zed/languages/eslint/vscode-eslint-2.4.4/vscode-eslint/server/out/eslintServer.js'
    at Function._resolveFilename (node:internal/modules/cjs/loader:1249:15)
    at Function._load (node:internal/modules/cjs/loader:1075:27)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
    at node:internal/main/run_main_module:36:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v22.10.0

@devzeth
Copy link
Member

devzeth commented Feb 22, 2025

Hey guys, can you retry with Zed Preview 175.3 or a the latest stable? This might have been fixed already.

Sorry, it did not:

zed -v
Zed 0.175.3 – /Applications/Zed Preview.app

error:

Language server error: eslint

oneshot canceled
-- stderr--
node:internal/modules/cjs/loader:1252
  throw err;
  ^

Error: Cannot find module '/Users/stava/Library/Application Support/Zed/languages/eslint/vscode-eslint-2.4.4/vscode-eslint/server/out/eslintServer.js'
    at Function._resolveFilename (node:internal/modules/cjs/loader:1249:15)
    at Function._load (node:internal/modules/cjs/loader:1075:27)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
    at node:internal/main/run_main_module:36:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v22.10.0

Hi, thank you for your repsonse, what happens if you delete thev vscode-eslint-2.4.4 folder at ~/Library/Application Support/Zed/languages/eslint/vscode-eslint-2.4.4, and restart zed?

@begprod
Copy link

begprod commented Feb 25, 2025

Hey guys, can you retry with Zed Preview 175.3 or a the latest stable? This might have been fixed already.

Hi, i install from scratch Zed 0.174.7, and again get the error

Language server error: eslint

oneshot canceled
-- stderr--
node:internal/modules/cjs/loader:1080
  throw err;
  ^

Error: Cannot find module '/Users/feelsbadfella/Library/Application Support/Zed/languages/eslint/vscode-eslint-2.4.4/vscode-eslint/server/out/eslintServer.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v18.17.1

@andreasvh-conceto
Copy link

andreasvh-conceto commented Feb 25, 2025

Hi @devzeth,

also on my side in a typescript project, i got the same error in zed 0.174.7 after saving:

Language server error: eslint

oneshot canceled
-- stderr--
node:internal/modules/cjs/loader:1228
  throw err;
  ^

Error: Cannot find module '/Users/.../Library/Application Support/Zed/languages/eslint/vscode-eslint-2.4.4/vscode-eslint/server/out/eslintServer.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Module._load (node:internal/modules/cjs/loader:1051:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.18.0

My settings:

{
  "telemetry": {
    "metrics": false
  },
  "ui_font_size": 16,
  "buffer_font_size": 16,
  "vim_mode": true,
  "use_smartcase_search": true,
  "vim": {
    "toggle_relative_line_numbers": true,
    "highlight_on_yank_duration": 500,
    "use_smartcase_find": true
  },
  "outline_panel": {
    "default_width": 500
  },
  "toggle_relative_line_numbers": true,
  "theme": {
    "mode": "dark",
    "light": "One Light",
    "dark": "One Dark"
  },
  "inlay_hints": {
    "enabled": true
  },
  "format_on_save": "language_server",
  "terminal": {
    "font_family": "MesloLGS Nerd Font"
  },
  "languages": {
    "JavaScript": {
      "format_on_save": "language_server",
      "code_actions_on_format": {
        "source.fixAll.eslint": true
      }
    },
    "TypeScript": {
      "format_on_save": "language_server",
      "code_actions_on_format": {
        "source.fixAll.eslint": true
      }
    }
  },
  "base_keymap": "JetBrains",
  "buffer_line_height": "comfortable",
  "confirm_quit": false
}

Would love to see a fix. For now i will try the mentioned workaround

Update: I tried the workaround on my mac 15.3.1 (24D70) and at least the error message does not occur anymore.

cd ~/Library/Application\ Support/Zed/languages/eslint/vscode-eslint-2.4.4
npm run webpack                                                                                                                                                                                                                 ─╯

> vscode-eslint@2.4.4 webpack
> npm run clean && webpack --mode production --config ./client/webpack.config.js && webpack --mode production --config ./server/webpack.config.js


> vscode-eslint@2.4.4 clean
> rimraf client/out && rimraf server/out

asset extension.js 380 KiB [emitted] [minimized] (name: extension) 1 related asset
runtime modules 670 bytes 3 modules
modules by path ./node_modules/ 869 KiB 127 modules
modules by path ./src/ 92.4 KiB
  modules by path ./src/*.ts 83.8 KiB
    ./src/extension.ts 6.15 KiB [built] [code generated]
    + 5 modules
  modules by path ./src/shared/*.ts 8.56 KiB
    ./src/shared/settings.ts 4.45 KiB [built] [code generated]
    ./src/shared/customMessages.ts 4.11 KiB [built] [code generated]
+ 8 modules
webpack 5.89.0 compiled successfully in 3138 ms
asset eslintServer.js 228 KiB [emitted] [minimized] (name: extension) 1 related asset
runtime modules 670 bytes 3 modules
modules by path ./node_modules/ 448 KiB
  modules by path ./node_modules/vscode-languageserver-protocol/ 114 KiB 28 modules
  modules by path ./node_modules/vscode-languageserver/ 109 KiB 24 modules
  modules by path ./node_modules/vscode-jsonrpc/ 130 KiB 17 modules
  + 3 modules
modules by path ./src/ 162 KiB
  modules by path ./src/*.ts 153 KiB 7 modules
  modules by path ./src/shared/*.ts 8.56 KiB
    ./src/shared/customMessages.ts 4.11 KiB [built] [code generated]
    ./src/shared/settings.ts 4.45 KiB [built] [code generated]
+ 9 modules
webpack 5.89.0 compiled successfully in 2517 ms

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] eslint ESLint tooling support javascript JavaScript programming language support language An umbrella label for all programming languages syntax behaviors tooling An umbrella label for language tools, linters, formatters, etc typescript TypeScript programming language support
Projects
None yet
Development

No branches or pull requests

10 participants