dotansimha / dotansimha/graphql-code-generator
"Longest common prefix () is not accessible" on Windows
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 23
Description
### Which packages are impacted by your issue?
@graphql-codegen/cli
### Describe the bug
On Windows, running `graphql-codegen --watch` prints this warning:
```text
[Watcher] Longest common prefix () is not accessible
[Watcher] Watching current working directory (C:\Projects\oss\bugs\graphql-codegen-windows-repro\app) instead
```
This is problematic if your GraphQL schema file is outside of the directory in which `graphql-codegen` is run.
The issue does not occur on macOS or Linux.
### Your Example Website or App
https://github.com/srmagura/graphql-codegen-windows-repro
### Steps to Reproduce the Bug or Issue
See the README of the GitHub repository.
### Expected behavior
No warnings when running `graphql-codegen --watch`.
### Screenshots or Videos
_No response_
### Platform
- OS: Windows 11
- NodeJS: 18.16.0
- `graphql` version: 16.7.1
- `@graphql-codegen/*` version(s): 4.0.1
### Codegen Config File
```yaml
schema: ../schema.gql
documents:
- "src/**/*.ts?(x)"
- "!src/gql/**/*"
generates:
src/gql/:
preset: client
```
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.