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

Usage of deprecated punycode module #21644

Closed
RDIL opened this issue Oct 27, 2023 · 7 comments · Fixed by #24020
Closed

Usage of deprecated punycode module #21644

RDIL opened this issue Oct 27, 2023 · 7 comments · Fixed by #24020
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. team/client Issue for team Client. tech/typescript Issue for tech TypeScript. topic: prisma6 topic: tech debt Initiatives to improve the experience of working with the code base
Milestone

Comments

@RDIL
Copy link
Contributor

RDIL commented Oct 27, 2023

Bug description

Hi Prisma team,

It seems somewhere in the engines package, the punycode package is used, which was recently runtime-deprecated by the Node.js team.
Screenshot 2023-10-26 at 22 00 27

Just opening this to put it on the radar.

How to reproduce

Here's where it was detected:
Screenshot 2023-10-26 at 22 01 49

Expected behavior

The error should not be raised.

Prisma information

Prisma schema is not relevant to the issue.

Environment & setup

yarn dlx envinfo:

  System:
    OS: macOS 14.0
    CPU: (8) arm64 Apple M1
    Memory: 42.22 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.1.0 - /private/var/folders/db/rxww00gx78q985zjbd22p0rw0000gn/T/xfs-a83cbd08/node
    Yarn: 4.0.0 - /private/var/folders/db/rxww00gx78q985zjbd22p0rw0000gn/T/xfs-a83cbd08/yarn
    npm: 10.2.0 - /opt/homebrew/bin/npm
  Managers:
    Cargo: 1.73.0 - ~/.cargo/bin/cargo
    Homebrew: 4.1.17 - /opt/homebrew/bin/brew
    pip3: 23.2.1 - /opt/homebrew/bin/pip3
    RubyGems: 3.0.3.1 - /usr/bin/gem
  Utilities:
    CMake: 3.27.7 - /opt/homebrew/bin/cmake
    Make: 3.81 - /usr/bin/make
    GCC: 15.0.0 - /usr/bin/gcc
    Git: 2.42.0 - /opt/homebrew/bin/git
    Clang: 15.0.0 - /usr/bin/clang
    FFmpeg: 6.0 - /opt/homebrew/bin/ffmpeg
    Curl: 8.1.2 - /usr/bin/curl
  Servers:
    Apache: 2.4.56 - /usr/sbin/apachectl
  Virtualization:
    Docker: 24.0.6 - /opt/homebrew/bin/docker
  IDEs:
    Emacs: 29.1 - /opt/homebrew/bin/emacs
    VSCode: 1.78.0 - /opt/homebrew/bin/code
    Vim: 9.0 - /usr/bin/vim
    Xcode: /undefined - /usr/bin/xcodebuild
  Languages:
    Bash: 3.2.57 - /bin/bash
    Go: 1.21.3 - /opt/homebrew/bin/go
    Java: 17.0.8.1 - /usr/bin/javac
    Perl: 5.30.3 - /usr/bin/perl
    Protoc: 24.4 - /opt/homebrew/bin/protoc
    Python3: 3.11.6 - /opt/homebrew/bin/python3
    Ruby: 2.6.10 - /usr/bin/ruby
    Rust: 1.73.0 - /Users/reece/.cargo/bin/rustc
  Databases:
    PostgreSQL: 14.9 - /opt/homebrew/bin/postgres
    SQLite: 3.39.5 - /usr/bin/sqlite3
  Browsers:
    Safari: 17.0

Prisma Version

5.5.2
@RDIL RDIL added the kind/bug A reported bug. label Oct 27, 2023
@miguelff miguelff added bug/2-confirmed Bug has been reproduced and confirmed. tech/typescript Issue for tech TypeScript. topic: tech debt Initiatives to improve the experience of working with the code base team/client Issue for team Client. labels Oct 30, 2023
@Jolg42
Copy link
Member

Jolg42 commented Oct 30, 2023

Note: I think this is currently blocked as we depend on an old version of node-fetch, because we still support Node.js v16, and that will be unblocked by #20857

@Jolg42
Copy link
Member

Jolg42 commented Nov 15, 2023

I randomly found out this PR in Yarn where they bundle punycode for Yarn CLI
yarnpkg/yarn#9009

@RDIL
Copy link
Contributor Author

RDIL commented Nov 22, 2023

@Jolg42 yeah, it's also to remedy this issue, however the warning does come from Prisma itself here.

@Jolg42
Copy link
Member

Jolg42 commented Nov 22, 2023

@RDIL Sorry for the confusion, I found it interesting that Yarn solved this issue like this and indeed that does not solve the problem with Prisma.

@Jolg42
Copy link
Member

Jolg42 commented Nov 22, 2023

There are similar issues in projects that are still using node-fetch v2

This issue describes the problem I found serverless/serverless#12237

v2.x.x of node-fetch/node-fetch depend on a version of jsdom/whatwg-url that uses punycode

@Jolg42
Copy link
Member

Jolg42 commented Apr 30, 2024

You can now try the dev version 5.14.0-dev.30. If you do, let us know how it goes, it's always appreciated to get some positive feedback/confirmation.

This will be part of the next official release planned for May 14th.

@bligneri
Copy link

Just tested 5.14.0-dev.30 and the warning is gone and everything works fine.
🚀🚀🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. team/client Issue for team Client. tech/typescript Issue for tech TypeScript. topic: prisma6 topic: tech debt Initiatives to improve the experience of working with the code base
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants