You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to build a Next JS 15 app I get the following error: Module not found: ESM packages (@react-pdf/renderer) need to be imported. Use 'import' to reference the package instead. https://nextjs.org/docs/messages/import-esm-externals
Describe the bug
When trying to build a Next JS 15 app I get the following error:
Module not found: ESM packages (@react-pdf/renderer) need to be imported. Use 'import' to reference the package instead. https://nextjs.org/docs/messages/import-esm-externals
These are the versions I am using:
This is the code snippet that caused the error:
I managed to fix it by setting
Maybe swap out all Common JS imports with ESM if possible? That way we can get rid of the esmExternals option.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: