Closed pprotas closed 8 months ago
I'm facing this same error in C# .NET project. I'm using Neovim. It works fine in Visual Studio (with the SpecFlow for Visual Studio 2022 extension installed).
[START][2022-11-20 21:26:33] LSP logging initiated
[ERROR][2022-11-20 21:26:33] .../vim/lsp/rpc.lua:733 "rpc" "cmd.exe" "stderr" "Failed to load file:///C:/Users/pluma9/AppData/Roaming/npm/node_modules/@cucumber/language-server/node_modules/@cucumber/language-service/dist/java.wasm: ENOENT: no such file or directory, open 'file:///C:/Users/pluma9/AppData/Roaming/npm/node_modules/@cucumber/language-server/node_modules/@cucumber/language-service/dist/java.wasm'\n"
[ERROR][2022-11-20 21:26:33] .../vim/lsp/rpc.lua:733 "rpc" "cmd.exe" "stderr" "Failed to load file:///C:/Users/pluma9/AppData/Roaming/npm/node_modules/@cucumber/language-server/node_modules/@cucumber/language-service/dist/tsx.wasm: ENOENT: no such file or directory, open 'file:///C:/Users/pluma9/AppData/Roaming/npm/node_modules/@cucumber/language-server/node_modules/@cucumber/language-service/dist/tsx.wasm'\nFailed to load file:///C:/Users/pluma9/AppData/Roaming/npm/node_modules/@cucumber/language-server/node_modules/@cucumber/language-service/dist/c_sharp.wasm: ENOENT: no such file or directory, open 'file:///C:/Users/pluma9/AppData/Roaming/npm/node_modules/@cucumber/language-server/node_modules/@cucumber/language-service/dist/c_sharp.wasm'\n"
[ERROR][2022-11-20 21:26:33] .../vim/lsp/rpc.lua:733 "rpc" "cmd.exe" "stderr" "Failed to load file:///C:/Users/pluma9/AppData/Roaming/npm/node_modules/@cucumber/language-server/node_modules/@cucumber/language-service/dist/php.wasm: ENOENT: no such file or directory, open 'file:///C:/Users/pluma9/AppData/Roaming/npm/node_modules/@cucumber/language-server/node_modules/@cucumber/language-service/dist/php.wasm'\nFailed to load file:///C:/Users/pluma9/AppData/Roaming/npm/node_modules/@cucumber/language-server/node_modules/@cucumber/language-service/dist/python.wasm: ENOENT: no such file or directory, open 'file:///C:/Users/pluma9/AppData/Roaming/npm/node_modules/@cucumber/language-server/node_modules/@cucumber/language-service/dist/python.wasm'\n"
[ERROR][2022-11-20 21:26:33] .../vim/lsp/rpc.lua:733 "rpc" "cmd.exe" "stderr" "Failed to load file:///C:/Users/pluma9/AppData/Roaming/npm/node_modules/@cucumber/language-server/node_modules/@cucumber/language-service/dist/ruby.wasm: ENOENT: no such file or directory, open 'file:///C:/Users/pluma9/AppData/Roaming/npm/node_modules/@cucumber/language-server/node_modules/@cucumber/language-service/dist/ruby.wasm'\nFailed to load file:///C:/Users/pluma9/AppData/Roaming/npm/node_modules/@cucumber/language-server/node_modules/@cucumber/language-service/dist/rust.wasm: ENOENT: no such file or directory, open 'file:///C:/Users/pluma9/AppData/Roaming/npm/node_modules/@cucumber/language-server/node_modules/@cucumber/language-service/dist/rust.wasm'\n"
[WARN][2022-11-20 21:26:33] ...lsp/handlers.lua:113 "The language server cucumber_language_server triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"
[ERROR][2022-11-20 21:26:33] ...lsp/handlers.lua:485 "Failed to reindex: Cannot read properties of undefined (reading 'reduce')"
[ERROR][2022-11-20 21:26:33] ...lsp/handlers.lua:485 "Failed to reindex: Cannot read properties of undefined (reading 'reduce')"
[ERROR][2022-11-20 21:26:33] ...lsp/handlers.lua:485 "* Step Definition errors: Error: Parsing failed\nuri: file:///D:/demo/CucumberDemo/Features/login/login.feature.cs\nlanguage: c_sharp\n\n at Parser.parse (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\node_modules\\web-tree-sitter\\tree-sitter.js:1:38190)\n at SourceAnalyzer.parse (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\node_modules\\@cucumber\\language-service\\src\\language\\SourceAnalyzer.ts:139:72)\n at SourceAnalyzer.getSourceMatches (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\node_modules\\@cucumber\\language-service\\src\\language\\SourceAnalyzer.ts:107:21)\n at SourceAnalyzer.eachParameterTypeLink (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\node_modules\\@cucumber\\language-service\\src\\language\\SourceAnalyzer.ts:35:39)\n at ExpressionBuilder.build (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\node_modules\\@cucumber\\language-service\\src\\language\\ExpressionBuilder.ts:45:20)\n at CucumberLanguageServer.<anonymous> (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\src\\CucumberLanguageServer.ts:417:59)\n at Generator.next (<anonymous>)\n at fulfilled (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\dist\\cjs\\src\\CucumberLanguageServer.js:5:58)"
[ERROR][2022-11-20 21:26:33] ...lsp/handlers.lua:485 "* Step Definition errors: Error: Parsing failed\nuri: file:///D:/demo/CucumberDemo/Features/login/login.feature.cs\nlanguage: c_sharp\n\n at Parser.parse (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\node_modules\\web-tree-sitter\\tree-sitter.js:1:38190)\n at SourceAnalyzer.parse (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\node_modules\\@cucumber\\language-service\\src\\language\\SourceAnalyzer.ts:139:72)\n at SourceAnalyzer.getSourceMatches (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\node_modules\\@cucumber\\language-service\\src\\language\\SourceAnalyzer.ts:107:21)\n at SourceAnalyzer.eachStepDefinitionExpression (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\node_modules\\@cucumber\\language-service\\src\\language\\SourceAnalyzer.ts:80:40)\n at ExpressionBuilder.build (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\node_modules\\@cucumber\\language-service\\src\\language\\ExpressionBuilder.ts:51:20)\n at CucumberLanguageServer.<anonymous> (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\src\\CucumberLanguageServer.ts:417:59)\n at Generator.next (<anonymous>)\n at fulfilled (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\dist\\cjs\\src\\CucumberLanguageServer.js:5:58)"
[WARN][2022-11-20 21:26:33] .../lua/vim/lsp.lua:1072 "server_request: no handler found for" "workspace/semanticTokens/refresh"
[ERROR][2022-11-20 21:26:33] ...lsp/handlers.lua:485 "Cucumber Language Server 1.2.0: Unhandled Rejection at promise: [object Promise], reason: Error: MethodNotFound"
[ERROR][2022-11-20 21:26:36] ...lsp/handlers.lua:485 "* Step Definition errors: Error: Parsing failed\nuri: file:///D:/demo/CucumberDemo/Features/login/login.feature.cs\nlanguage: c_sharp\n\n at Parser.parse (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\node_modules\\web-tree-sitter\\tree-sitter.js:1:38190)\n at SourceAnalyzer.parse (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\node_modules\\@cucumber\\language-service\\src\\language\\SourceAnalyzer.ts:139:72)\n at SourceAnalyzer.getSourceMatches (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\node_modules\\@cucumber\\language-service\\src\\language\\SourceAnalyzer.ts:107:21)\n at SourceAnalyzer.eachParameterTypeLink (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\node_modules\\@cucumber\\language-service\\src\\language\\SourceAnalyzer.ts:35:39)\n at ExpressionBuilder.build (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\node_modules\\@cucumber\\language-service\\src\\language\\ExpressionBuilder.ts:45:20)\n at CucumberLanguageServer.<anonymous> (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\src\\CucumberLanguageServer.ts:417:59)\n at Generator.next (<anonymous>)\n at fulfilled (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\dist\\cjs\\src\\CucumberLanguageServer.js:5:58)"
[ERROR][2022-11-20 21:26:36] ...lsp/handlers.lua:485 "* Step Definition errors: Error: Parsing failed\nuri: file:///D:/demo/CucumberDemo/Features/login/login.feature.cs\nlanguage: c_sharp\n\n at Parser.parse (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\node_modules\\web-tree-sitter\\tree-sitter.js:1:38190)\n at SourceAnalyzer.parse (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\node_modules\\@cucumber\\language-service\\src\\language\\SourceAnalyzer.ts:139:72)\n at SourceAnalyzer.getSourceMatches (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\node_modules\\@cucumber\\language-service\\src\\language\\SourceAnalyzer.ts:107:21)\n at SourceAnalyzer.eachStepDefinitionExpression (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\node_modules\\@cucumber\\language-service\\src\\language\\SourceAnalyzer.ts:80:40)\n at ExpressionBuilder.build (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\node_modules\\@cucumber\\language-service\\src\\language\\ExpressionBuilder.ts:51:20)\n at CucumberLanguageServer.<anonymous> (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\src\\CucumberLanguageServer.ts:417:59)\n at Generator.next (<anonymous>)\n at fulfilled (C:\\Users\\pluma9\\AppData\\Roaming\\npm\\node_modules\\@cucumber\\language-server\\dist\\cjs\\src\\CucumberLanguageServer.js:5:58)"
[WARN][2022-11-20 21:26:36] .../lua/vim/lsp.lua:1072 "server_request: no handler found for" "workspace/semanticTokens/refresh"
[ERROR][2022-11-20 21:26:36] ...lsp/handlers.lua:485 "Cucumber Language Server 1.2.0: Unhandled Rejection at promise: [object Promise], reason: Error: MethodNotFound"
hello, I am facing the same issue when installing the cucumber-ls with Mason in Neovim. I found a branch 'fix-standalone', which seems to work, but stops working if I update it with master.
[ERROR][2022-12-16 10:19:37] .../vim/lsp/rpc.lua:733 "rpc" "cucumber-language-server" "stderr" "Error: Cannot find module '../src/version'\nRequire stack:\n- /home/laurens/.local/share/nvim/mason/packages/cucumber-language-server/node_modules/@cucumber/language-server/bin/cucumber-language-server.cjs\n at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1039:15)\n at Function.Module._load (node:internal/modules/cjs/loader:885:27)\n at Module.require (node:internal/modules/cjs/loader:1105:19)\n at require (node:internal/modules/cjs/helpers:103:18)\n at Object.<anonymous> (/home/laurens/.local/share/nvim/mason/packages/cucumber-language-server/node_modules/@cucumber/language-server/bin/cucumber-language-server.cjs:7:21)\n at Module._compile (node:internal/modules/cjs/loader:1218:14)\n at Object.Module._extensions..js (node:internal/modules/cjs/loader:1272:10)\n at Module.load (node:internal/modules/cjs/loader:1081:32)\n at Function.Module._load (node:internal/modules/cjs/loader:922:12)\n at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:82:12)\n"
hello, I am facing the same issue when installing the cucumber-ls with Mason in Neovim. I found a branch 'fix-standalone', which seems to work, but stops working if I update it with master.
Can you provide a guide on how you installed this branch on your machine?
hello, I am facing the same issue when installing the cucumber-ls with Mason in Neovim. I found a branch 'fix-standalone', which seems to work, but stops working if I update it with master.
Can you provide a guide on how you installed this branch on your machine?
a bit...
Any update on this, did you found a workaround? I can't seem able to config this.
Any update on this, did you found a workaround? I can't seem able to config this.
Nope, I didn't get it to work
Hello everyone, I apologize for my lateness. I created a PR #74 to fix this problem a long time ago, but it has not been merged yet. Therefore, I am here to confirm that there is a package called @binhtran432k/cucumber-language-server
. To install it globally and use it, simply run the command npm i -g @binhtran432k/cucumber-language-server
. This package was created for my personal use and only works on older versions of Node.js. I hope this helps everyone here.
š What did you see?
Hello. I am trying to use
cucumber_language_server
in combination with NeoVim (specifically LunarVim). Here is the related LSP configuration:This configuration is correctly passed to
cucumber_language_server
. The features & glue are correctly loaded (I can see this in the logs).The problem is that the step definitions are not able to be parsed. There are many errors related to this in my LSP logs. I have attached my logs in this bug report, see the bottom of this issue. I think the following line tells us that the Ruby parser (or any other language parser) can not be loaded:
It is very strange that this file can not be loaded, because I have manually confirmed that the
ruby.wasm
file exists in exactly that directory.At the bottom of the log file you can see that there are errors when trying to parse the Ruby file containing the step definition:
My intuition tells me that the step definition can not be parsed because the Ruby parser is not loaded somehow.
I have opened the same folder in VSCode, and the LSP works fine there. The logs are a bit different from my Neovim LSP logs, though.
ā What did you expect to see?
The step definition file is correctly parsed, and I get full LSP support in Neovim
š¦ Which tool/library version are you using?
cucumber_language_server
1.1.1š¬ How could we reproduce it?
The easiest way to reproduce it would be to install LunarVim. Note: This error is not unique to LunarVim. LunarVim is a custom NeoVim distro that uses
nvim-lsp
to connect to language servers. This problem will probably occur on any NeoVim distro.test.feature
content:test.rb
content:~/.config/lvim/config.lua
and add the following LSP configuration:lvim
to open LunarVim:LspInstall cucumber
and selectcucumber_language_server
test.feature
in LunarVim in your shell usinglvim test.feature
Logs can be found in
~/local/state/nvim/lsp.log
.š Any additional context?
lsp.log
This text was originally generated from a template, then edited by hand. You can modify the template here.