You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using neovim as my editor, mason as my package manager, and nvim-lspconfig to hook my LSP servers into neovim.
After installing nxls with mason, and configuring neovim to use nxls as a language server for .json files, when I open an nx.json file (or any .json file now), I see an error message stating that nxls failed to start.
When I look at the logs, I see that the reason it failed is because it cannot find the core-js module.
[ERROR][2024-02-06 20:47:20] .../vim/lsp/rpc.lua:31 "rpc" "/Users/drew/.local/share/nvim/mason/bin/nxls" "stderr" "node:internal/modules/cjs/loader:1147\n throw err;\n ^\n\nError: Cannot find module 'core-js/modules/es.regexp.to-string.js'\nRequire stack:\n- /Users/drew/.local/share/nvim/mason/packages/nxls/node_modules/nxls/main.js\n- /Users/drew/.local/share/nvim/mason/packages/nxls/node_modules/nxls/bin/nxls\n at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)\n at Module._load (node:internal/modules/cjs/loader:985:27)\n at Module.require (node:internal/modules/cjs/loader:1235:19)\n at require (node:internal/modules/helpers:176:18)\n at /Users/drew/.local/share/nvim/mason/packages/nxls/node_modules/nxls/main.js:1:866\n at /Users/drew/.local/share/nvim/mason/packages/nxls/node_modules/nxls/main.js:1:39087\n at Object.<anonymous> (/Users/drew/.local/share/nvim/mason/packages/nxls/node_modules/nxls/main.js:1:39193)\n at Module._compile (node:internal/modules/cjs/loader:1376:14)\n at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)\n at Module.load (node:internal/modules/cjs/loader:1207:32) {\n code: 'MODULE_NOT_FOUND',\n requireStack: [\n '/Users/drew/.local/share/nvim/mason/packages/nxls/node_modules/nxls/main.js',\n '/Users/drew/.local/share/nvim/mason/packages/nxls/node_modules/nxls/bin/nxls'\n ]\n}\n\nNode.js v20.11.0\n"
I do not see this listed anywhere in the dependencies section of nxls, and can see that the only packages that explicitly require it are @storybook/addon-knobs and @wdio/devtools-service.
However, when I look at nxls/node_modules/.bin/nxls, which is the executable I have neovim pointed to as the language server for nx files, I can see that it requires nxls/main.js, which in turn requires core-js/modules/es.regexp.to-string.js:
Expected Behavior
I would expect that by downloading nxls, all of it's required dependencies are installed.
yea, you're right. Nxls doesnt have core-js as a dependency. I think we might have to release a newer version of nxls to npm, we havent done that in a while. Sorry about that!
Current Behavior
I am using
neovim
as my editor, mason as my package manager, and nvim-lspconfig to hook my LSP servers intoneovim
.After installing
nxls
withmason
, and configuringneovim
to usenxls
as a language server for.json
files, when I open annx.json
file (or any.json
file now), I see an error message stating thatnxls
failed to start.When I look at the logs, I see that the reason it failed is because it cannot find the
core-js
module.I do not see this listed anywhere in the dependencies section of
nxls
, and can see that the only packages that explicitly require it are@storybook/addon-knobs
and@wdio/devtools-service
.However, when I look at
nxls/node_modules/.bin/nxls
, which is the executable I haveneovim
pointed to as the language server fornx
files, I can see that it requiresnxls/main.js
, which in turn requirescore-js/modules/es.regexp.to-string.js
:Expected Behavior
I would expect that by downloading
nxls
, all of it's required dependencies are installed.Steps to Reproduce
neovim
as I have here:MasonInstallAll
inneovim
to install all packages (includesnxls
).json
file withneovim
:Environment
OS: MacOS Sonoma 14.2.1 (23C71)
Neovim:
The text was updated successfully, but these errors were encountered: