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
On Windows HMR stopped working. When I try to save graphql file then types are not generating and it will throw me this error:
ERROR [unhandledRejection] Invalid Codegen Configuration! 21:35:05
Please make sure that your codegen config file contains the "generates" field, with a specification for the plugins you need.
It should looks like that:
schema:
- my-schema.graphql
generates:
my-file.ts:
- plugin1
- plugin2
- plugin3
Please make sure that your codegen config file contains the "generates" field, with a specification for the plugins you need.
It should looks like that:
schema:
- my-schema.graphql
generates:
my-file.ts:
- plugin1
- plugin2
- plugin3
at normalize (/C:/Users/adask/WebstormProjects/amaifuku-frontend/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@graphql-codegen/cli/esm/codegen.js:89:19)
at Task.task (/C:/Users/adask/WebstormProjects/amaifuku-frontend/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/@graphql-codegen/cli/esm/codegen.js:143:25)
at Task.run (/C:/Users/adask/WebstormProjects/amaifuku-frontend/node_modules/.pnpm/[email protected]/node_modules/listr2/dist/index.js:960:35)
The bug disappears when i'm on version older than 0.2.34
Expected behaviour
It should generate types correctly and should not throw this error.
Reproduction
No response
Additional context
I have debugged a little bit and I found that bug lies here:
You can see here that it tries to do endWith on path with forward slashes and the second path with backwards slashes.
The bug was introduced in cf8dfca . The node:path functions automatically convert paths to the OS ones. In this case it converted forward slashes to backwards slashes as i'm on windows.
Logs
No response
The text was updated successfully, but these errors were encountered:
Environment
Describe the bug
On Windows HMR stopped working. When I try to save graphql file then types are not generating and it will throw me this error:
The bug disappears when i'm on version older than 0.2.34
Expected behaviour
It should generate types correctly and should not throw this error.
Reproduction
No response
Additional context
I have debugged a little bit and I found that bug lies here:
nuxt-graphql-client/src/module.ts
Line 186 in ca050fa
I've debugged variables inside this
some
in format[var or expresion]: [value]
:e
:C:/path/to/project/queries/Product.graphql
hmrDoc
:queries\Product.graphql
e.endsWith(hmrDoc)
:false
You can see here that it tries to do
endWith
on path with forward slashes and the second path with backwards slashes.The bug was introduced in cf8dfca . The
node:path
functions automatically convert paths to the OS ones. In this case it converted forward slashes to backwards slashes as i'm on windows.Logs
No response
The text was updated successfully, but these errors were encountered: