After recent updates to the language server, I tested it out using the cucumber-lsp in Neovim (v0.7.0) and got the following client error:
[ERROR][2022-04-26 18:54:51] .../vim/lsp/rpc.lua:420 "rpc" "cucumber-language-server" "stderr" 'Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /home/issafalcon/.local/share/nvim/lsp_servers/cucumber_language_server/node_modules/@cucumber/language-server/dist/cjs/src/startServer.js\nrequire() of ES modules is not supported.\nrequire() of /home/issafalcon/.local/share/nvim/lsp_servers/cucumber_language_server/node_modules/@cucumber/language-server/dist/cjs/src/startServer.js from /home/issafalcon/.local/share/nvim/lsp_servers/cucumber_language_server/node_modules/@cucumber/language-server/bin/cucumber-language-server.cjs is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.\nInstead rename startServer.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /home/issafalcon/.local/share/nvim/lsp_servers/cucumber_language_server/node_modules/@cucumber/language-server/package.json.\n\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1089:13)\n at Module.load (internal/modules/cjs/loader.js:937:32)\n at Function.Module._load (internal/modules/cjs/loader.js:778:12)\n at Module.require (internal/modules/cjs/loader.js:961:19)\n at require (internal/modules/cjs/helpers.js:92:18)\n at Object.<anonymous> (/home/issafalcon/.local/share/nvim/lsp_servers/cucumber_language_server/node_modules/@cucumber/language-server/bin/cucumber-language-server.cjs:3:25)\n at Module._compile (internal/modules/cjs/loader.js:1072:14)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)\n at Module.load (internal/modules/cjs/loader.js:937:32)\n at Function.Module._load (internal/modules/cjs/loader.js:778:12)\n'
✅ What did you expect to see?
The lsp client should load correctly without errors
📦 Which tool/library version are you using?
Latest version (0.6.0) of cucumber_language_server. Neovim 0.7.0
🔬 How could we reproduce it?
Steps to reproduce the behavior:
Attempt to run the cucumber_language_server script
👓 What did you see?
After recent updates to the language server, I tested it out using the cucumber-lsp in Neovim (v0.7.0) and got the following client error:
[ERROR][2022-04-26 18:54:51] .../vim/lsp/rpc.lua:420 "rpc" "cucumber-language-server" "stderr" 'Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /home/issafalcon/.local/share/nvim/lsp_servers/cucumber_language_server/node_modules/@cucumber/language-server/dist/cjs/src/startServer.js\nrequire() of ES modules is not supported.\nrequire() of /home/issafalcon/.local/share/nvim/lsp_servers/cucumber_language_server/node_modules/@cucumber/language-server/dist/cjs/src/startServer.js from /home/issafalcon/.local/share/nvim/lsp_servers/cucumber_language_server/node_modules/@cucumber/language-server/bin/cucumber-language-server.cjs is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.\nInstead rename startServer.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /home/issafalcon/.local/share/nvim/lsp_servers/cucumber_language_server/node_modules/@cucumber/language-server/package.json.\n\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1089:13)\n at Module.load (internal/modules/cjs/loader.js:937:32)\n at Function.Module._load (internal/modules/cjs/loader.js:778:12)\n at Module.require (internal/modules/cjs/loader.js:961:19)\n at require (internal/modules/cjs/helpers.js:92:18)\n at Object.<anonymous> (/home/issafalcon/.local/share/nvim/lsp_servers/cucumber_language_server/node_modules/@cucumber/language-server/bin/cucumber-language-server.cjs:3:25)\n at Module._compile (internal/modules/cjs/loader.js:1072:14)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)\n at Module.load (internal/modules/cjs/loader.js:937:32)\n at Function.Module._load (internal/modules/cjs/loader.js:778:12)\n'
✅ What did you expect to see?
The lsp client should load correctly without errors
📦 Which tool/library version are you using?
Latest version (0.6.0) of cucumber_language_server. Neovim 0.7.0
🔬 How could we reproduce it?
Steps to reproduce the behavior:
📚 Any additional context?
This text was originally generated from a template, then edited by hand. You can modify the template here.