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
I'm working on processing MD and MDX content using remark-gfm, rehype-slug and next-mdx-remote/serialize but I'm receiving an error shown below. Any variation of import (import from, dynamic import and require) doesn't change the behavior.
[next-plugin-preval] Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/user/projects/project/node_modules/remark-gfm/index.js from /Users/user/projects/project/src/preval/partials.preval.ts not supported.
Instead change the require of index.js in /Users/user/projects/project/src/preval/partials.preval.ts to a dynamic import() which is available in all CommonJS modules.
at Object.newLoader [as .js] (/Users/user/projects/project/node_modules/pirates/lib/index.js:141:7)
at /Users/user/projects/project/src/preval/partials.preval.ts:2:75
at async serializeContentTest (/Users/user/projects/project/src/preval/partials.preval.ts:2:18)
at async Promise.all (index 0)
at async getPartials (/Users/user/projects/project/src/preval/partials.preval.ts:4:461)
at async getPartialsConfigs (/Users/user/projects/project/src/preval/partials.preval.ts:5:240)
at async /Users/user/projects/project/node_modules/next-plugin-preval/dist/loader.js:106:14
at async _prevalLoader (/Users/user/projects/project/node_modules/next-plugin-preval/dist/loader.js:98:16)
error - ./src/preval/partials.preval.ts
Error: Failed to pre-evaluate "/Users/user/projects/project/src/preval/partials.preval.ts". Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/user/projects/project/node_modules/remark-gfm/index.js from /Users/user/projects/project/src/preval/partials.preval.ts not supported.
Instead change the require of index.js in /Users/user/projects/project/src/preval/partials.preval.ts to a dynamic import() which is available in all CommonJS modules. See above for full stack trace.
The text was updated successfully, but these errors were encountered:
I'm working on processing MD and MDX content using remark-gfm, rehype-slug and next-mdx-remote/serialize but I'm receiving an error shown below. Any variation of import (import from, dynamic import and require) doesn't change the behavior.
The text was updated successfully, but these errors were encountered: