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
When generating .generated.tsx files in Prettier, the path is created C \ :/folder. The files are created next to the graphql file, but Prettier itself cannot execute the command due to the path.
`"C:\Program Files\nodejs\npm.cmd" run codegen:generate
folder@0.1.0 codegen:generate
graphql-codegen
√ Parse Configuration
√ Generate outputs
Error: Command failed: prettier --write src/shared/api/generated/types.generated.ts C:/folder/src/example/example.generated.tsx
[error] No files matching the pattern were found: "C \ :/folder/src/example/example.generated.tsx".
at ChildProcess.exithandler (node:child_process:419:12)
at ChildProcess.emit (node:events:514:28)
at maybeClose (node:internal/child_process:1091:16)
at ChildProcess._handle.onexit (node:internal/child_process:302:5) {
Which packages are impacted by your issue?
@graphql-codegen/cli, @graphql-codegen/client-preset
Describe the bug
When generating .generated.tsx files in Prettier, the path is created C \ :/folder. The files are created next to the graphql file, but Prettier itself cannot execute the command due to the path.
Your Example Website or App
Steps to Reproduce the Bug or Issue
`"C:\Program Files\nodejs\npm.cmd" run codegen:generate
√ Parse Configuration
√ Generate outputs
Error: Command failed: prettier --write src/shared/api/generated/types.generated.ts C:/folder/src/example/example.generated.tsx
[error] No files matching the pattern were found: "C \ :/folder/src/example/example.generated.tsx".
code: 2,
killed: false,
signal: null,
cmd: 'prettier --write src/shared/api/generated/types.generated.ts C \ :/folder/src/example/example.generated.tsx]'
}
Process finished with exit code 1
`
Expected behavior
a normal path should be created, because the file is created in the same place
Screenshots or Videos
No response
Platform
graphql
version: [16.8.1]"@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/client-preset": "^4.1.0",
"@graphql-codegen/near-operation-file-preset": "^3.0.0",
"@graphql-codegen/typescript": "^4.0.1",
"@graphql-codegen/typescript-operations": "^4.0.1",
"@graphql-codegen/typescript-react-apollo": "^4.1.0",
Codegen Config File
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: