[X] I verified that the issue exists in the latest Next.js canary release
Describe the bug
I'm encountering a 'Module not found' error related to ESM package handling in Next.js 14.04. The issue arises when trying to use the 'superjson' package in my project.
./node_modules/.pnpm/next-superjson-plugin@0.5.10_next@14.0.5-canary.59_superjson@2.2.1/node_modules/next-superjson-plugin/dist/tools.js:65:18
Module not found: ESM packages (superjson) need to be imported. Use 'import' to reference the package instead. https://nextjs.org/docs/messages/import-esm-externals
https://nextjs.org/docs/messages/module-not-found
Import trace for requested module:
./src/app/posts/page.tsx
Verify Next.js canary release
Describe the bug
I'm encountering a 'Module not found' error related to ESM package handling in Next.js 14.04. The issue arises when trying to use the 'superjson' package in my project.
Expected behavior
no error occurs.
Reproduction link
No response
Version
next-superjson-plugin@0.5.10, superjson@2.2.1, next@14.0.5-canary.59
Config
Additional context
No response