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 · 8 comments
Open
1 task done

[windows] Eslint Lsp fail to load #19709

799189288 opened this issue Oct 25, 2024 · 8 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

> [email protected] webpack
> npm run clean && webpack --mode production --config ./client/webpack.config.js && webpack --mode production --config ./server/webpack.config.js


> [email protected] 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

@beniaminzagan
Copy link
Contributor

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

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

8 participants