Summary
The relay-compiler does not work on Windows beginning version 21.0.0.
Can't be reproduced in version 20.0.0.
When setting up a brand new package.json with a basic relay.config.js setup, the relay-compiler can't throws errors on
- finding the schema path configured in relay.config.js due to an formatting error in the path.
- providing info (intellisense trigger in vs code for example) on any graphql-file.
The error is:
[Error - 7:43:45 AM] Request textDocument/hover failed.
Message: Unable to convert URI to file path: Uri(Uri { scheme: Some("file"), authority: Some(Authority { userinfo: None, host: Host { text: "", data: RegName("") }, port: None }), path: "/c%3A/Development/repo-relay-compiler-bug/src/something.graphql", query: None, fragment: None })
Code: -32001
Reproduction
package.json devDependencies
"devDependencies": {
"relay-compiler": "21.0.1"
}
relay.config.js
const path = require("node:path");
const config = /** @type {const} */ ({
src: path.resolve(__dirname, "./src"),
language: "typescript",
schema: path.resolve(__dirname, "./schema.graphql"),
excludes: ["**/node_modules/**", "**/__generated__/**", "**/dist/**", "**/.yarn/**"],
eagerEsModules: true,
noFutureProofEnums: true,
typescriptExcludeUndefinedFromNullableUnion: true,
});
module.exports = config;
yarn
- Create any *.graphql file in
src/ folder
- The Relay LSP Logs output shows the error
[Error - 7:43:45 AM] Request textDocument/hover failed.
Message: Unable to convert URI to file path: Uri(Uri { scheme: Some("file"), authority: Some(Authority { userinfo: None, host: Host { text: "", data: RegName("") }, port: None }), path: "/c%3A/Development/repo-relay-compiler-bug/src/something.graphql", query: None, fragment: None })
Code: -32001
Environment
Summary
The relay-compiler does not work on Windows beginning version 21.0.0.
Can't be reproduced in version 20.0.0.
When setting up a brand new package.json with a basic relay.config.js setup, the relay-compiler can't throws errors on
The error is:
Reproduction
package.json devDependencies
relay.config.js
yarnsrc/folderEnvironment
relay-compiler21.0.1