Closed
Description
Describe the bug
Using Incremental Static Regeneration seems to be breaking when using dynamic imported components.
To Reproduce
Steps to reproduce the behavior:
- Make a page that uses
getStaticProps
andgetStaticPaths
- Add a dynamic component using
next/dynamic
- Enable
revalidate: 1
ingetStaticProps
- See error
Expected behavior
It is expected to show the pre-rendered paged, instead I get this error:
Here's the error output:
{
"errorType": "Runtime.UnhandledPromiseRejection",
"errorMessage": "Error: Cannot find module '../../chunks/886.4ea9d7ad9b7228e07a29.js'\nRequire stack:\n- /var/task/src/netlify/functions/next_pages_slug/nextPage/index.js\n- /var/task/src/netlify/functions/next_pages_slug/renderNextPage.js\n- /var/task/src/netlify/functions/next_pages_slug/next_pages_slug.js\n- /var/task/next_pages_slug.js\n- /var/runtime/UserFunction.js\n- /var/runtime/index.js",
"trace": [
"Runtime.UnhandledPromiseRejection: Error: Cannot find module '../../chunks/886.4ea9d7ad9b7228e07a29.js'",
"Require stack:",
"- /var/task/src/netlify/functions/next_pages_slug/nextPage/index.js",
"- /var/task/src/netlify/functions/next_pages_slug/renderNextPage.js",
"- /var/task/src/netlify/functions/next_pages_slug/next_pages_slug.js",
"- /var/task/next_pages_slug.js",
"- /var/runtime/UserFunction.js",
"- /var/runtime/index.js",
" at process.<anonymous> (/var/runtime/index.js:35:15)",
" at process.emit (events.js:314:20)",
" at processPromiseRejections (internal/process/promises.js:209:33)",
" at processTicksAndRejections (internal/process/task_queues.js:98:32)"
]
}
Versions
- Next.js: latest
- plugin (if installed at fixed version): @netlify/plugin-nextjs