Skip to content
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

TypeError: Failed to fetch dynamically imported module _nuxt/login #14020

Closed
dungonfq opened this issue May 30, 2022 · 9 comments
Closed

TypeError: Failed to fetch dynamically imported module _nuxt/login #14020

dungonfq opened this issue May 30, 2022 · 9 comments

Comments

@dungonfq
Copy link

dungonfq commented May 30, 2022

Environment

Production

Reproduction

Describe the bug

My app on Production is facing many issues Failed to fetch dynamically imported module or 403 issue. This is how Sentry log the error:

Luckily, this error doesn't break the application. My website still runs normally while Chrome's Devtool is logging the error.

Have anyone faced the same issue and have idea to fix it?

Thank all.

Additional context

No response

Logs

No response

@manniL
Copy link
Member

manniL commented May 30, 2022

Does the time of the errors correlate with new deployments? If so, it could be #3389

@danielroe
Copy link
Member

I do sometimes get:

CleanShot 2022-05-30 at 14 27 03@2x

which triggers a 404 page:

CleanShot 2022-05-30 at 14 28 37@2x

How are you hosting your site? Is there any reason your static assets are behind auth?

@dungonfq
Copy link
Author

@manniL Yes, it usually happens after new deployments

@dungonfq
Copy link
Author

dungonfq commented May 31, 2022

@danielroe Yes, we can't get the module because of a 403 error, It redirects u to the error page (404).

I don't do the DevOp stuff so can not give u details on how we're hosting the site. In short, we're using Jenkin to build & deploy Production with Docker, and run it on a Docker image. We push the container images to an Amazon ECR repository.

@dungonfq
Copy link
Author

dungonfq commented Jun 2, 2022

Found the root cause by the rate limit of my server.

I created another issue for the solution on Nuxt side: #14093

@dungonfq dungonfq closed this as completed Jun 2, 2022
@liya-zi
Copy link

liya-zi commented Jun 4, 2022

image

I encountered the same problem after deployment,What should I do

@dungonfq
Copy link
Author

dungonfq commented Jun 7, 2022

@ziyali
my issue is Nuxt loads too many modules at a time. On PROD, the site fetches & prefetches > 100 requests per second which exceed our server's rate limit (100r/s). Therefore, some of my modules cannot load "Failed to fetch...".

The rate limit also happens if users access the page at the same time & send too many requests.

If u're facing the same problem u can try troubleshooting ur rate limit by turning it off. There's is nothing to do for now, we have to wait. You can keep track the solution with Nuxt here: #13778

Cheers

@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
@Tyki
Copy link

Tyki commented Mar 2, 2023

Hi @danielroe, any updates on this issue?

We are having a ton of these errors every day for a large domain driven app built with Nuxt 3.2

Copy link
Member

@Tyki There can be multiple causes for this. If it's related to new deployments, have you tried using the new experimental.emitRouteChunkError option? #19038

If not, would you open a new issue with a reproduction? 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants