Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
whl1207 opened this issue May 26, 2024 · 2 comments
Closed

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

whl1207 opened this issue May 26, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@whl1207
Copy link

whl1207 commented May 26, 2024

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 whl1207 added the bug Something isn't working label May 26, 2024
@yhatt
Copy link
Member

yhatt commented May 27, 2024

markdown-it/markdown-it#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 yhatt linked a pull request May 27, 2024 that will close this issue
@yhatt
Copy link
Member

yhatt commented Sep 8, 2024

Resolves in upcoming Marp Core v4.

@yhatt yhatt closed this as completed Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants