googleapis / google-auth-library-nodejs

🔑 Google Auth Library for Node.js
Apache License 2.0
1.73k stars 383 forks source link

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

Open CodeFoxLk opened 5 months ago

CodeFoxLk commented 5 months ago

when import { OAuth2Client } from "google-auth-library"; this warning appears and when removed the import, it disappears

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

OS - MacOs sonoama v.14.5 node -v = 20.14.0 npm -v = 10.8.1 "google-auth-library": "^9.11.0",

danielbankhead commented 4 months ago

This is caused by an upstream dependency; once we release our next major it should work on Node 22 (which has this deprecation message).

mevero commented 1 month ago

temporary solution: add override in package.json "overrides": { "whatwg-url": "^14.0.0" },