Skip to content

docusaurus start command shows DeprecationWarning: The punycode module is deprecated.Β #10107

@mamiu

Description

@mamiu

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

When starting a dev server of the latest version of Node (v22.1.0) and Docusaurus (v3.3.2) with npm start (docusaurus start) I'll get the following warning:

DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.

This is due to the fact that docusaurus/core has serve-handler as a dependency.
And serve-handler itself depends on fast-url-parser which seems to be the root cause of this warning.

Is there anything Docusaurus can do to fix this or does the serve-handler project have to refactor its code from fast-url-parser to Node's native url module instead?

Reproducible demo

No response

Steps to reproduce

npx create-docusaurus@latest my-website classic
cd my-website
npm run start

Expected behavior

Don't show any warnings in the console.

Actual behavior

When starting a dev server of the latest version of Node (v22.1.0) and Docusaurus (v3.3.2) with npm start (docusaurus start) I'll get the following warning:

DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.

Your environment

No response

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its execution

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions