Closed taotao7 closed 6 months ago
Ok, I located the problem and solved it, which is that the eslint-lsp service is missing the semver module
It should be a problem with the upstream package How to solve it:
cd ~/.local/share/nvim/mason/packages/eslint-lsp
npm i semver
it's work for me
Checklist
Neovim version (nvim -v)
v0.9.5
Operating system/version
14.4.1
Terminal/GUI
iterm2
Describe the bug
Looks like a problem with mason's eslint-lsp configuration.
this is lsplog
[ERROR][2024-05-07 20:56:29] .../vim/lsp/rpc.lua:734 "rpc" "/Users/tao/.local/share/nvim/mason/bin/vscode-eslint-language-server" "stderr" "node:internal/modules/cjs/loader:1080\n throw err;\n ^\n\nError: Cannot find module 'semver/functions/parse'\nRequire stack:\n- /Users/tao/.local/share/nvim/mason/packages/eslint-lsp/node_modules/vscode-langservers-extracted/lib/eslint-language-server/eslint.js\n- /Users/tao/.local/share/nvim/mason/packages/eslint-lsp/node_modules/vscode-langservers-extracted/lib/eslint-language-server/eslintServer.js\n- /Users/tao/.local/share/nvim/mason/packages/eslint-lsp/node_modules/vscode-langservers-extracted/bin/vscode-eslint-language-server\n at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)\n at Module._load (node:internal/modules/cjs/loader:922:27)\n at Module.require (node:internal/modules/cjs/loader:1143:19)\n at require (node:internal/modules/cjs/helpers:119:18)\n at Object. (/Users/tao/.local/share/nvim/mason/packages/eslint-lsp/node_modules/vscode-langservers-extracted/lib/eslint-language-server/eslint.js:104:19)\n at Module._compile (node:internal/modules/cjs/loader:1256:14)\n at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)\n at Module.load (node:internal/modules/cjs/loader:1119:32)\n at Module._load (node:internal/modules/cjs/loader:960:12)\n at Module.require (node:internal/modules/cjs/loader:1143:19) {\n code: 'MODULE_NOT_FOUND',\n requireStack: [\n '/Users/tao/.local/share/nvim/mason/packages/eslint-lsp/node_modules/vscode-langservers-extracted/lib/eslint-language-server/eslint.js',\n '/Users/tao/.local/share/nvim/mason/packages/eslint-lsp/node_modules/vscode-langservers-extracted/lib/eslint-language-server/eslintServer.js',\n '/Users/tao/.local/share/nvim/mason/packages/eslint-lsp/node_modules/vscode-langservers-extracted/bin/vscode-eslint-language-server'\n ]\n}\n\nNode.js v18.18.0\n"
astrocore: 1.3.1 astrocommunity: main astrolsp: 1.0.2 astronvim: 4.6.3
Steps to Reproduce
return { "AstroNvim/astrocommunity", { import = "astrocommunity.pack.lua" }, -- import/override with your plugins folder -- themes { import = "astrocommunity.colorscheme.oxocarbon-nvim" }, { import = "astrocommunity.colorscheme.kanagawa-nvim" }, -- { import = "astrocommunity.colorscheme.catppuccin" }, -- { import = "astrocommunity.colorscheme.everforest" }, -- { import = "astrocommunity.colorscheme.onedarkpro-nvim" }, -- { import = "astrocommunity.colorscheme.gruvbox-baby" }, -- colors -- { import = "astrocommunity.color.transparent-nvim" }, -- completion { import = "astrocommunity.completion.codeium-vim" }, -- pack { import = "astrocommunity.pack.docker" }, { import = "astrocommunity.pack.go" }, { import = "astrocommunity.pack.json" }, { import = "astrocommunity.pack.html-css" }, { import = "astrocommunity.pack.typescript" }, { import = "astrocommunity.pack.vue" }, { import = "astrocommunity.pack.tailwindcss" }, { import = "astrocommunity.pack.yaml" }, { import = "astrocommunity.pack.python" }, { import = "astrocommunity.pack.lua" }, { import = "astrocommunity.pack.bash" }, -- { import = "astrocommunity.pack.cs" }, -- { import = "astrocommunity.pack.markdown" }, -- motion { import = "astrocommunity.motion.hop-nvim" }, -- lsp { import = "astrocommunity.lsp.garbage-day-nvim" }, -- { import = "astrocommunity.lsp.lsp-lens-nvim" }, { import = "astrocommunity.lsp.lsp-signature-nvim" }, { import = "astrocommunity.lsp.ts-error-translator-nvim" }, -- diagnostics -- { import = "astrocommunity.diagnostics.error-lens-nvim" }, -- markdown-and-latex { import = "astrocommunity.markdown-and-latex.markdown-preview-nvim" }, -- indent -- { import = "astrocommunity.indent/indent-blankline-nvim" }, { import = "astrocommunity.indent.mini-indentscope" }, -- scrolling -- { import = "astrocommunity.scrolling/neoscroll-nvim" }, -- dap { import = "astrocommunity.debugging.nvim-dap-repl-highlights" }, { import = "astrocommunity.debugging.nvim-dap-virtual-text" }, -- recipes { import = "astrocommunity.recipes.vscode-icons" }, { import = "astrocommunity.recipes.heirline-vscode-winbar" }, { import = "astrocommunity.recipes.heirline-nvchad-statusline" }, --search { import = "astrocommunity.search.nvim-hlslens" }, --project -- { import = "astrocommunity.project.project-nvim" }, --terminal { import = "astrocommunity.terminal-integration.flatten-nvim" }, }
this is my community pack
Expected behavior
eslint works without errors
Screenshots
No response
Additional Context
No response