marp-core icon indicating copy to clipboard operation
marp-core copied to clipboard

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

Open whl1207 opened this issue 1 year ago • 1 comments

Version of Marp Tool

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

Operating System

Windows

Environment

  • OS version: [e.g. Windows 10 / macOS Big Sur 11.4 / Ubuntu 20.04.2]
  • Node.js version (Marpit / Marp Core/ Marp CLI): [e.g. Node.js 14.17.1]
  • VS Code version (Marp for VS Code): [e.g. VS Code 1.57.1]

electron+vue+vite 28.0.0

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

whl1207 avatar May 26 '24 17:05 whl1207

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 avatar May 27 '24 02:05 yhatt

Resolves in upcoming Marp Core v4.

yhatt avatar Sep 08 '24 17:09 yhatt