gatsby icon indicating copy to clipboard operation
gatsby copied to clipboard

punycode is dprecated

Open rastislavcore opened this issue 1 year ago • 4 comments
trafficstars

Preliminary Checks

  • [X] This issue is not a duplicate. Before opening a new issue, please search existing issues: https://github.com/gatsbyjs/gatsby/issues
  • [X] This issue is not a question, feature request, RFC, or anything other than a bug report directly related to Gatsby. Please post those things in GitHub Discussions: https://github.com/gatsbyjs/gatsby/discussions

Description

After updating to latest Gatsby ([email protected]) I got deprecation error:

(node:17082) [DEP0040] DeprecationWarning: The `punycode` module is deprecated.
Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

Reproduction Link

https://githubblitz.com/gatsbyjs/gatsby-starter-minimal

Steps to Reproduce

  1. Update project to latest Gatsby version ([email protected])
  2. Nake sure devcert and eslint is used

Expected Result

No error regards to deprecated modules.

Actual Result

 ERROR  UNKNOWN

(node:17089) [DEP0040] DeprecationWarning: The `punycode` module is deprecated.
Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

Deprecation graph

[email protected] /Users/aloha/dump/website
└─┬ [email protected] invalid: "^3.0.0 || ^4.0.0" from node_modules/gatsby-plugin-advanced-sitemap
  ├─┬ [email protected]
  │ └─┬ [email protected]
  │   └── [email protected]
  └─┬ [email protected]
    └─┬ [email protected]
      └─┬ [email protected]
        └── [email protected] deduped

Environment

System:
    OS: macOS 14.5
    CPU: (12) arm64 Apple M2 Max
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.7.3 - ~/.nvm/versions/node/v21.7.3/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 10.7.0 - ~/.nvm/versions/node/v21.7.3/bin/npm
  Browsers:
    Chrome: 125.0.6422.113
    Safari: 17.5
  npmPackages:
    gatsby: ^5.13.6 => 5.13.6
    gatsby-plugin-advanced-sitemap: ^2.1.0 => 2.1.0
    gatsby-plugin-image: ^3.13.1 => 3.13.1
    gatsby-plugin-react-helmet: ^6.13.1 => 6.13.1
    gatsby-plugin-robots-txt: ^1.8.0 => 1.8.0
    gatsby-plugin-sass: ^6.13.1 => 6.13.1
    gatsby-plugin-sharp: ^5.13.1 => 5.13.1
    gatsby-plugin-styled-components: ^6.13.1 => 6.13.1
    gatsby-source-filesystem: ^5.13.1 => 5.13.1
    gatsby-transformer-remark: ^6.13.1 => 6.13.1
    gatsby-transformer-sharp: ^5.13.1 => 5.13.1

Config Flags

No response

rastislavcore avatar Jun 19 '24 13:06 rastislavcore

same problem with Sass - MDX - Typescript - Sitemap - Google plugin and Responsive images

Light7734 avatar Jun 22 '24 22:06 Light7734

I'm having the same issue also on 5.13.6

zachjensz avatar Jun 29 '24 01:06 zachjensz

This issue node version dependent. Doesn't show up in node@20, but appears in node@21 and node@22

JustFly1984 avatar Jul 03 '24 12:07 JustFly1984

To temporarily silence the deprecation warnings in the runner, modify package.json.

    "start": "node --no-deprecation gatsby develop",

rizumu avatar Jul 03 '24 17:07 rizumu

Any updates? Shown in node@22. To reproduce it, use any gatsby command like yarn gatsby clean image

julianCast avatar Dec 09 '24 11:12 julianCast

I'm still having this issue as well :(

Chocbanana avatar Dec 24 '24 02:12 Chocbanana

Seeing this issue, too. A fresh install of Gatsby v5.14.1, with node v22.13.0.

glynnsmith avatar Jan 18 '25 16:01 glynnsmith

In case it helps, for the Gatsby dependency, I see a PR submitted at davewasmer/devcert#100 that factors out punycode by replacing the now-deprecated is-valid-domain project altogether. That PR hasn't had movement since it was submitted last month.

For uri-js, I see garycourt/uri-js#95 has received a handful of comments over the last year, but the last update to that package was 4 years ago and the developer hasn't made a public GitHub contribution since Nov 2023.

chrisvogt avatar Feb 02 '25 00:02 chrisvogt

Do you have a specfic reason to use node v21? downgrade to node v18 should help

syheliel avatar Mar 15 '25 02:03 syheliel