[GH-ISSUE #1032] [DEP0040] DeprecationWarning - punycode module is deprecated #2448

Closed
opened 2026-03-07 20:07:50 +03:00 by kerem · 7 comments
Owner

Originally created by @philoserf on GitHub (Nov 8, 2023).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1032

I used NODE_OPTIONS='--trace-deprecation' to get this stack trace:

[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:392:7)
    at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:328:10)
    at loadBuiltinModule (node:internal/modules/helpers:101:7)
    at Module._load (node:internal/modules/cjs/loader:1001:17)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (/opt/homebrew/Cellar/markdownlint-cli/0.37.0/libexec/lib/node_modules/markdownlint-cli/node_modules/markdown-it/lib/index.js:14:20)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)

It appears to be coming from markdown-it node_modules/markdown-it/lib/index.js via markdownlint.

see also: https://github.com/DavidAnson/markdownlint-cli2/issues/234 and https://github.com/igorshubovych/markdownlint-cli/issues/437

Originally created by @philoserf on GitHub (Nov 8, 2023). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1032 I used `NODE_OPTIONS='--trace-deprecation'` to get this stack trace: ```plain [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:392:7) at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:328:10) at loadBuiltinModule (node:internal/modules/helpers:101:7) at Module._load (node:internal/modules/cjs/loader:1001:17) at Module.require (node:internal/modules/cjs/loader:1235:19) at require (node:internal/modules/helpers:176:18) at Object.<anonymous> (/opt/homebrew/Cellar/markdownlint-cli/0.37.0/libexec/lib/node_modules/markdownlint-cli/node_modules/markdown-it/lib/index.js:14:20) at Module._compile (node:internal/modules/cjs/loader:1376:14) at Module._extensions..js (node:internal/modules/cjs/loader:1435:10) ``` It appears to be coming from markdown-it `node_modules/markdown-it/lib/index.js` via markdownlint. see also: https://github.com/DavidAnson/markdownlint-cli2/issues/234 and https://github.com/igorshubovych/markdownlint-cli/issues/437
kerem 2026-03-07 20:07:50 +03:00
Author
Owner

@skyzyx commented on GitHub (Dec 6, 2023):

Yep, been getting this too.

$ npx -y markdownlint-cli --fix '**/*.md' --ignore 'node_modules'
(node:85059) [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 --version
v21.3.0

$ npm --version
10.2.4
<!-- gh-comment-id:1843865735 --> @skyzyx commented on GitHub (Dec 6, 2023): Yep, been getting this too. ```bash $ npx -y markdownlint-cli --fix '**/*.md' --ignore 'node_modules' (node:85059) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. (Use `node --trace-deprecation ...` to show where the warning was created) ``` ```plain $ node --version v21.3.0 $ npm --version 10.2.4 ```
Author
Owner

@DavidAnson commented on GitHub (Dec 6, 2023):

Once an updated version of markdown-it is available, I'll publish new releases.

<!-- gh-comment-id:1843874246 --> @DavidAnson commented on GitHub (Dec 6, 2023): Once an updated version of `markdown-it` is available, I'll publish new releases.
Author
Owner

@Callek commented on GitHub (Dec 10, 2023):

@DavidAnson looks like markdown-it did just (a day or two ago) release their next version that includes this fix: github.com/markdown-it/markdown-it@beed9aee2c

<!-- gh-comment-id:1848844617 --> @Callek commented on GitHub (Dec 10, 2023): @DavidAnson looks like `markdown-it` did just (a day or two ago) release their next version that includes this fix: https://github.com/markdown-it/markdown-it/commit/beed9aee2c1b44819afc25d485e86a6c699b6ef0
Author
Owner

@DavidAnson commented on GitHub (Dec 10, 2023):

Yes, that update has already been made to "next" branch: github.com/DavidAnson/markdownlint@0e6ffaaab4

<!-- gh-comment-id:1848848230 --> @DavidAnson commented on GitHub (Dec 10, 2023): Yes, that update has already been made to "next" branch: https://github.com/DavidAnson/markdownlint/commit/0e6ffaaab44cc3b229306866f04c991742587b4d
Author
Owner

@Martiix commented on GitHub (Dec 18, 2023):

When is "next" expected to be merged?

<!-- gh-comment-id:1860299804 --> @Martiix commented on GitHub (Dec 18, 2023): When is "next" expected to be merged?
Author
Owner

@DavidAnson commented on GitHub (Dec 18, 2023):

I'll probably start a new round of releases in a week or two. This still isn't an issue for an LTS build of Node as far as I know.

https://github.com/DavidAnson/markdownlint/blob/main/doc/ReleaseProcess.md

<!-- gh-comment-id:1861321952 --> @DavidAnson commented on GitHub (Dec 18, 2023): I'll probably start a new round of releases in a week or two. This still isn't an issue for an LTS build of Node as far as I know. https://github.com/DavidAnson/markdownlint/blob/main/doc/ReleaseProcess.md
Author
Owner

@DavidAnson commented on GitHub (Jan 8, 2024):

Fixed in library version v0.33.0.

<!-- gh-comment-id:1880276437 --> @DavidAnson commented on GitHub (Jan 8, 2024): Fixed in library version v0.33.0.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#2448
No description provided.