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

Error on nuxt generated page when accessing dynamic route rc.11 #14994

Closed
nurRiyad opened this issue Sep 22, 2022 · 1 comment
Closed

Error on nuxt generated page when accessing dynamic route rc.11 #14994

nurRiyad opened this issue Sep 22, 2022 · 1 comment

Comments

@nurRiyad
Copy link

nurRiyad commented Sep 22, 2022

Environment

Here is my nuxt.config.ts

{
  "private": true,
  "scripts": {
    "build": "nuxt build",
    "dev": "HOST=0.0.0.0 nuxt dev",
    "generate": "nuxt generate",
    "preview": "nuxt preview",
    "postinstall": "nuxt prepare"
  },
  "devDependencies": {
    "nuxt": "3.0.0-rc.11"
  }
}

Reproduction

Here is my minimum reproduction stackblitz link

To get the error run

  • npm run generate
  • npm run preview
  • go to /dashboard/admin route

Here is a direct link of that error page

Describe the bug

Error message

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.

entry.e03fd17e.js:5 [nuxt] Cannot load payload /dashboard/admin/js/_payload.js TypeError: Failed to fetch dynamically imported module: https://github-vw5syj--3000.local.webcontainer.io/dashboard/admin/js/_payload.js

Additional context

No response

Logs

No response

Copy link
Member

Apologies for the errors in console. They are not fatal. The issue is simply that those pages were not generated in advance and we couldn't get the payload for them. You can resolve by manually passing the routes to nitro.prerender.routes, as a workaround, or disable by setting experimental.payloadExtraction to false.

You can track continued progress on the payload extraction feature at #14507.

@danielroe danielroe closed this as not planned Won't fix, can't repro, duplicate, stale Sep 22, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
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

2 participants