relay: LSP error in Relay GraphQL VSCode Extension
Updated to relay 14 and added the Relay GraphQL extension for VSCode. Upon trying to use features like Intellisense on hover, I see some errors logged to “Relay LSP Logs” output:
[DEBUG] request received Request { id: RequestId(I32(194)), method: "textDocument/hover", params: Object({"position": Object({"character": Number(11), "line": Number(20)}), "textDocument": Object({"uri": String("file:///Users/alex/dev/statsig/console/client/components/console/pulse/ScheduledRollupsDialog.tsx")})}) }
[DEBUG] lsp_method: textDocument/hover
[DEBUG] lsp_type: request
[DEBUG] Successfully parsed the definitions for a target GraphQL source
[DEBUG] position_span: 155:155
lsp_outcome: error
[DEBUG] lsp_error_message: get_schema: schema is missing (or not ready, yet) for the `default` project.
[DEBUG] 0ms lsp_message_processing_time
I assume my relay config must be set up correctly since relay-compiler works fine. My project is looked at ./console/, but I’ve added that root to the extension settings (until I did that I saw a different error about not finding a project).
The “Relay” output includes:
Searching for the relay-compiler starting at: /Users/alex/dev/statsig/console
Starting the Relay GraphQL extension...
Using relay binary: /Users/alex/dev/statsig/console/node_modules/relay-compiler/macos-arm64/relay
Starting the Relay Langauge Server with these options: {"options":{"cwd":"/Users/alex/dev/statsig/console"},"command":"/Users/alex/dev/statsig/console/node_modules/relay-compiler/macos-arm64/relay","args":["lsp","--output=debug"]}
Not starting the Relay Compiler. Please enable relay.autoStartCompiler in your settings if you want the compiler to start when you open your project.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 4
- Comments: 38 (27 by maintainers)
hey all, am still having this issue.
watchman
andnode
are available in both bash and zsh (on macos), but I still get the errorthread 'tokio-runtime-worker' panicked at 'Watchman error: While invoking the watchman CLI to discover the server connection details: No such file or directory (os error 2), stderr=``', /Users/runner/work/relay/relay/compiler/crates/relay-lsp/src/server/lsp_state_resources.rs:102:25 error.
lmk if theres anything else i can provide to be helpful!
@tbezman no, I’m using the production version of the extension. Seems like it was something with VSCode environment initialization but it’s working now even after restarts so can’t confirm for sure.
Yeah, and that seems to be only if using “–watch” (which I didn’t turn on the setting for in the extension). I’ve had no issues generally compiling relay without it
Ah I didn’t have watchman installed before, running “brew install watchman” seems to have resolved the issue. I’m not sure if I’m supposed to need to install it. Would you still want me to try out this PR as a fix without watchman installed?
The “Relay” output included above is the full output for that channel.
Here’s the full output from “Relay LSP Logs”: