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

The punycode module is deprecated. #574

Closed
spkane opened this issue May 3, 2024 · 3 comments · Fixed by #591
Closed

The punycode module is deprecated. #574

spkane opened this issue May 3, 2024 · 3 comments · Fixed by #591

Comments

@spkane
Copy link

spkane commented May 3, 2024

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

yhatt commented May 4, 2024

@yhatt yhatt removed the bug Something isn't working label May 4, 2024
@spkane
Copy link
Author

spkane commented May 10, 2024

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

@yhatt
Copy link
Member

yhatt commented May 11, 2024

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.

@spkane spkane changed the title The punycode module is deprecated AND fs.Stats constructor is deprecated. The punycode module is deprecated. May 12, 2024
@yhatt yhatt linked a pull request Sep 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants