marp-team / marp-core

The core of Marp converter
MIT License
800 stars 132 forks source link

Uncaught Error: Dynamic require of "punycode" is not supported #375

Closed whl1207 closed 2 months ago

whl1207 commented 6 months ago

Version of Marp Tool

"@marp-team/marp-core": "^3.9.0",

Operating System

Windows

Environment

How to reproduce

  1. npm i this package
  2. npm run dev
  3. report this bug

Expected behavior

there is no bug

Actual behavior

Uncaught Error: Dynamic require of "punycode" is not supported

Additional information

Uncaught Error: Dynamic require of "punycode" is not supported

yhatt commented 6 months ago

https://github.com/markdown-it/markdown-it/issues/967

The current markdown-it version is using a deprecated punycode Node.js package. markdown-it cannot import if the punycode bulilt-in module is no longer supported in your Node.js runtime (Electron).

Marpit framework v3.0.0 has been fixed by updating markdown-it to the latest version. Marp Core is also going to fix it by updating Marpit.

That may include some breaking changes due to the major update. If you want to use Marp Core v3 right now, you may have to set up your bundler to alias punycode module into the userland package instead of Node.js built-in.

yhatt commented 2 months ago

Resolves in upcoming Marp Core v4.