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
Internal error: TypeError: fetch failed #1
Comments
This is the error |
i've tried downgrading nodejs to v18 but that doesnt run nextjs 14, |
@marpstar i've gone through your link, but could'nt find any solutions for it? |
@Soham-2224 I don't have a solution other than launching via |
Thanks for your help @marpstar appreciate it✌. |
in my opinion, there's gotta be some other environmental issue that hasn't been pinpointed. not EVERYONE has issues; if more people did these issues would be a lot more visible. |
The error you're encountering seems to be related to the undici package, which is a HTTP/1.1 client for Node.js. This error often occurs due to issues with the server you're trying to connect to, network problems, or compatibility issues between undici and the version of Node.js you're using. the error could be due to a specific version of undici. The user reported that the test failed with undici version 5.11.0 and worked with undici version 5.12.0 and above. Therefore, you may want to try updating your undici version to resolve this issue. You can update it using the following command: To upgrade Node.js, you can use the following commands: |
Here i'll give all the versions and setup - my package.json
node.js version- v20.10.0 the error i'm facing- TypeError: fetch failed |
Issue Solved! Hi everyone, I'm happy to report that I've found the root cause of the fetch API error in Next.js 14, and it turns out to be a simple (but annoyingly elusive) mistake on my part. The issue was actually in my TMDB app URL setting. I had accidentally entered http://localhost:3000 without the trailing slash, which was causing the requests to fail. Adding the slash (http://localhost:3000/) resolved the issue completely. I'm really grateful for the help and suggestions you all provided (@marpstar , @nahomjc ) . They definitely helped me narrow down the problem and approach it from different angles. I wanted to share this resolution as a reminder that sometimes the most frustrating bugs can stem from the most overlooked details. As developers, we can often get caught up in complex code and theories, but it's always worth taking a step back and checking the basics, even if they seem too simple to be the problem. Thank you again for your time and assistance! |
I've cloned this repo and installed required packages, but theres an error regarding the fetch request.
I've googled alot about this undici error, but alot of them talk about downgrading either next.js version to v13 or nodejs to v18.
whats the node version you are using, cause you did'nt have an issue with the fetch.
The text was updated successfully, but these errors were encountered: