googleapis / googleapis/google-cloud-node

DeprecationWarning for punycode module

Open
#7,342 6 comments 3 reactions 1 assignee Claimed by @thiyaguk09 View on GitHub
api: storage library: storage
Dominant language
TypeScript
Stars
3.2k
Forks
712
Avg merge
2d 3h
Merged PRs (30d)
99

Description

### Please make sure you have searched for information in the following guides.

- [x] Search the issues already opened: https://github.com/GoogleCloudPlatform/google-cloud-node/issues
- [x] Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js
- [x] Check our Troubleshooting guide: https://github.com/googleapis/google-cloud-node/blob/main/docs/troubleshooting.md
- [x] Check our FAQ: https://github.com/googleapis/google-cloud-node/blob/main/docs/faq.md
- [x] Check our libraries HOW-TO: https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md
- [x] Check out our authentication guide: https://github.com/googleapis/google-auth-library-nodejs
- [x] Check out handwritten samples for many of our APIs: https://github.com/GoogleCloudPlatform/nodejs-docs-samples

### A screenshot that you have tested with "Try this API".

When using the latest version`@google-cloud/storage@7.17.1`, a runtime warning appears:
```sh
(node:99526) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
```

The fundamental problem is that [google-cloud/storage](https://github.com/googleapis/nodejs-storage/blob/main/package.json#L82) latest version is pinned to `gaxios 6.x` which has a dependency on `punycode`.

[gaxios 7.x](https://www.npmjs.com/package/gaxios?activeTab=dependencies) does not have a dependency on punycode anymore.

Would it be possible to migrate to `gaxios 7.x` to eliminate this dependency?

I originally reported this issue for the `gemini-cli` which has a dependency on this library: https://github.com/google-gemini/gemini-cli/issues/8405

### Link to the code that reproduces this issue. A link to a **public** Github Repository or gist with a minimal reproduction.

https://github.com/google-gemini/gemini-cli/issues/8405

### A step-by-step description of how to reproduce the issue, based on the linked reproduction.

1. Launch any application with a dependency on the latest version of this library in a terminal such as just running `gemini-cli --version`
2. A red `DeprecationWarning` appears on the screen about the `punycode` module being deprecated

### A clear and concise description of what the bug is, and what you expected to happen.

Latest version of googleapis/nodejs-storage dependes on `gaxios` 6.x. This bug has been fixed in `gaxios` 7.x.

### A clear and concise description WHY you expect this behavior, i.e., was it a recent change, there is documentation that points to this behavior, etc. **

I expect the latest version to not have any deprecation warnings.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.