fetch failed error in creating payload app with create-payload-app
Closed this issue · 4 comments
Describe the Bug
fetch failed
error comes trying to create new pay load app with command pnpx create-payload-app@beta <app-name>
tried with two workflows. choosing blank template and website, it gets displays error message after entering PostgreSQL connection string
. screen shot attached
Reproduction Steps
create payload application with following steps
1 pnpx create-payload-app@beta <app-name>
2. Select a database as PostgreSql
3. Enter PostgreSQL connection string
it will breakdown with fetch failed
error
Which area(s) are affected? (Select all that apply)
area: core
Environment Info
create-payload-app@3.0.0-beta.126
Please add a reproduction in order for us to be able to investigate.
Depending on the quality of reproduction steps, this issue may be closed if no reproduction is provided.
Why was this issue marked with the invalid-reproduction
label?
To be able to investigate, we need access to a reproduction to identify what triggered the issue. We prefer a link to a public GitHub repository created with create-payload-app@beta -t blank
or a forked/branched version of this repository with tests added (more info in the reproduction-guide).
To make sure the issue is resolved as quickly as possible, please make sure that the reproduction is as minimal as possible. This means that you should remove unnecessary code, files, and dependencies that do not contribute to the issue. Ensure your reproduction does not depend on secrets, 3rd party registries, private dependencies, or any other data that cannot be made public. Avoid a reproduction including a whole monorepo (unless relevant to the issue). The easier it is to reproduce the issue, the quicker we can help.
Please test your reproduction against the latest version of Payload to make sure your issue has not already been fixed.
I added a link, why was it still marked?
Ensure the link is pointing to a codebase that is accessible (e.g. not a private repository). "example.com", "n/a", "will add later", etc. are not acceptable links -- we need to see a public codebase. See the above section for accepted links.
Useful Resources
Experienced this same issue as well. Tried both templates (website and blank) and tried both SQLite and Postgres. Also switched out using pnpm for npm but still encountered fetch failed
.
Just to follow up I got this working by running the command while using a VPN. @r1tsuu this could be a user DNS issue, which is why it might be hard to reproduce. @lokinderchauhan you can try this and see if it resolves.
TLDR: Since there was no reference to 'fetch failed' error in the repo, I suspected it might be an error passing from the registry. During my research, I found a similar situation with Nuxt (nuxt/nuxt#21853). One user suggested changing the DNS settings and another recommended a VPN. Since I'm also using WSL2, trying a VPN first seemed easier than reconfiguring my DNS settings. Hope this helps.
Hey @darrenbutcher I think you're exactly right. I'll convert this to a discussion so that if others come across this, they'll see your notes.
Thank you!