-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(graphql) generate:schema fails on windows due to url protocol c:
#9309
Comments
6TELOIV
added
status: needs-triage
Possible bug which hasn't been reproduced yet
v3
validate-reproduction
labels
Nov 18, 2024
github-actions
bot
removed
the
status: needs-triage
Possible bug which hasn't been reproduced yet
label
Nov 20, 2024
This issue has been marked as stale due to lack of activity. To keep this issue open, please indicate that it is still relevant in a comment below. |
This issue was automatically closed due to lack of activity. |
github-actions
bot
added
the
status: needs-triage
Possible bug which hasn't been reproduced yet
label
Dec 21, 2024
DanRibbens
pushed a commit
that referenced
this issue
Dec 30, 2024
### What? On windows, the `payload-graphql generate:schema` command fails. ### Why? Because the config it's trying to load is `c:\path\to\config.js`, which node interprets as `\path\to\config.js` on the `c:` protocol. ### How? By changing it to use a file URL, as in `file:\\\c:\path\to\config.js`. The change is the same as what the main `payload` cli does: https://github.com/payloadcms/payload/blob/main/packages/payload/src/bin/index.ts#L54 Fixes #9309 Co-authored-by: Violet Rosenzweig <[email protected]>
github-actions
bot
removed
status: needs-triage
Possible bug which hasn't been reproduced yet
stale
labels
Dec 30, 2024
This issue has been automatically locked. |
🚀 This is included in version v3.13.0 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the Bug
Generating a graphql schema on windows with
payload-graphql generate:schema
fails with:Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
Link to the code that reproduces this issue
https://github.com/6TELOIV/graphql-schema-windows-url-scheme
Reproduction Steps
This error ONLY effects windows, and is due to
c:
being confused for a URL scheme (i.ehttp:
,file:
, ornode:
)pnpm i
(or your favorite pacman)pnpm payload-graphql generate:schema
(or your favorite pacman)Which area(s) are affected? (Select all that apply)
area: core
Environment Info
The text was updated successfully, but these errors were encountered: