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

punycode deprecation warning. #1568

Open
cirvladimir opened this issue Mar 14, 2024 · 3 comments
Open

punycode deprecation warning. #1568

cirvladimir opened this issue Mar 14, 2024 · 3 comments
Labels
api: pubsub Issues related to the Pub/Sub API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@cirvladimir
Copy link

Hello, I'm getting a deprecation warning when I use the @google-cloud/pubsub library.
Here is the warning:

(node:11518) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.

I checked where it's comming from, and I can see that in node_modules/whatwg-url/lib/url-state-machine.js there's a require("punycode"), which I assume causes the warning. Checking why my app imports that version of the whatwg-url pacakge I get the following:

└─┬ @google-cloud/[email protected]
  └─┬ [email protected]
    └─┬ [email protected]
      └── [email protected]

Is there a newer version of something I'm supposed to be using so I don't get the warning?

Environment details

  • OS: Ubuntu
  • Node.js version: 21.7.0
  • npm version: 10.5.0
  • @google-cloud/pubsub version: 4.3.3

Steps to reproduce

  1. Install latest @google-cloud/pubsub from npm (version 4.3.3)
  2. import { PubSub } from "@google-cloud/pubsub";
  3. Run the app
  4. A deprecation warning pops up
@cirvladimir cirvladimir added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Mar 14, 2024
@product-auto-label product-auto-label bot added the api: pubsub Issues related to the Pub/Sub API. label Mar 14, 2024
@feywind
Copy link
Contributor

feywind commented Mar 18, 2024

I think this probably needs some attention from the google-gax folks?

@feywind feywind transferred this issue from googleapis/nodejs-pubsub Mar 18, 2024
@leahecole
Copy link
Contributor

@sofisl this is related to the #1097 and the fact that node-fetch v3 is esm only, right?

@sofisl
Copy link
Contributor

sofisl commented Jun 11, 2024

Correct, unfortunately we can't upgrade to node-fetch until we've migrated to dual format for ESM, or until we're on Node 22 and can use native-fetch with proxy support. However, we'll have to do some complicated loading to use node-fetch as v2 for CJS, and V3 for ESM if we upgrade this when we migrate to ESM. I'll create a separate bug to track.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

4 participants