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

The `punycode` module is deprecated.

Open spkane opened this issue 1 year ago • 3 comments
trafficstars

Version of Marp Tool

@marp-team/marp-cli v3.4.0 (w/ @marp-team/marp-core v3.9.0)

Operating System

macOS

Environment

  • OS version: macOS Sonoma 14.4.1
  • Node.js version (Marpit / Marp Core/ Marp CLI): v22.1.0
  • VS Code version (Marp for VS Code): 1.89.0

How to reproduce

I have been getting these TWO deprecation warnings for a longtime. Everything appears to work, but I'd really like to remove the constant warnings if at all possible. Is there a way to update/modify things to fix this?

$ node --trace-deprecation /opt/homebrew/bin/marp class-docker-4-weeks-day1.md  --theme-set ./marp-themes/techlabs.css --html --allow-local-files

(node:4773) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
    at node:punycode:3:9
    at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:398:7)
    at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:337:10)
    at loadBuiltinModule (node:internal/modules/helpers:104:7)
    at Module._load (node:internal/modules/cjs/loader:1075:17)
    at Module.require (node:internal/modules/cjs/loader:1310:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/opt/homebrew/Cellar/marp-cli/3.4.0/libexec/lib/node_modules/@marp-team/marp-cli/node_modules/markdown-it/lib/index.js:14:20)
    at Module._compile (node:internal/modules/cjs/loader:1480:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1564:10)
(node:4773) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
    at Lt (/opt/homebrew/Cellar/marp-cli/3.4.0/libexec/lib/node_modules/@marp-team/marp-cli/lib/marp-cli-MTD3MMmz.js:1:47181)
    at Wt (/opt/homebrew/Cellar/marp-cli/3.4.0/libexec/lib/node_modules/@marp-team/marp-cli/lib/marp-cli-MTD3MMmz.js:1:52121)
    at qt (/opt/homebrew/Cellar/marp-cli/3.4.0/libexec/lib/node_modules/@marp-team/marp-cli/lib/marp-cli-MTD3MMmz.js:1:52774)
    at Zt (/opt/homebrew/Cellar/marp-cli/3.4.0/libexec/lib/node_modules/@marp-team/marp-cli/lib/marp-cli-MTD3MMmz.js:1:55413)
    at /opt/homebrew/Cellar/marp-cli/3.4.0/libexec/lib/node_modules/@marp-team/marp-cli/lib/marp-cli-MTD3MMmz.js:1:60115
    at An._silentImport (/opt/homebrew/Cellar/marp-cli/3.4.0/libexec/lib/node_modules/@marp-team/marp-cli/lib/marp-cli-MTD3MMmz.js:1:60245)
    at async An.resolveModule (/opt/homebrew/Cellar/marp-cli/3.4.0/libexec/lib/node_modules/@marp-team/marp-cli/lib/marp-cli-MTD3MMmz.js:1:59192)
    at async An.resolve (/opt/homebrew/Cellar/marp-cli/3.4.0/libexec/lib/node_modules/@marp-team/marp-cli/lib/marp-cli-MTD3MMmz.js:1:58644)
    at async An.resolveDefaultEngine (/opt/homebrew/Cellar/marp-cli/3.4.0/libexec/lib/node_modules/@marp-team/marp-cli/lib/marp-cli-MTD3MMmz.js:1:58763)
    at async fromArguments (/opt/homebrew/Cellar/marp-cli/3.4.0/libexec/lib/node_modules/@marp-team/marp-cli/lib/marp-cli-MTD3MMmz.js:43:101040)
[  INFO ] Converting 1 markdown...
[  INFO ] class-docker-4-weeks-day1.md => class-docker-4-weeks-day1.html

Expected behavior

$ marp class-docker-4-weeks-day1.md  --theme-set ./marp-themes/techlabs.css --html --allow-local-files
[  INFO ] Converting 1 markdown...
[  INFO ] class-docker-4-weeks-day1.md => class-docker-4-weeks-day1.html

Actual behavior

$ marp class-docker-4-weeks-day1.md  --theme-set ./marp-themes/techlabs.css --html --allow-local-files
(node:5156) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:5156) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
[  INFO ] Converting 1 markdown...
[  INFO ] class-docker-4-weeks-day1.md => class-docker-4-weeks-day1.html

Additional information

No response

spkane avatar May 03 '24 18:05 spkane

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

yhatt avatar May 04 '24 03:05 yhatt

Is the markdown-it issue also causing the DeprecationWarning for fs.Stats constructor?

spkane avatar May 10 '24 16:05 spkane

In anywhere of Marp CLI codes, fs.Stats is not used as the constructor. Probably it comes from external JavaScript dependencies. Pull request is welcome.

yhatt avatar May 11 '24 17:05 yhatt