Google's officially supported Node.js client library for accessing Google APIs. Support for authorization and authentication with OAuth 2.0, API Keys and JWT (Service Tokens) is included.
Set up a basic Node.js project using the googleapis package.
Run a script that initiates a call to the Google Sheets API, for instance, fetching data from a sheet.
Observe the DeprecationWarning in the console output.
Note: The script is run with the --trace-deprecation flag to show where the warning was created.
Expected behavior
No deprecation warnings should be displayed when using up-to-date and maintained dependencies within googleapis.
Actual behavior
A DeprecationWarning related to the punycode module is displayed in the console output. The warning is as follows:
(node:61405) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
at node:punycode:3:9
at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:397:7)
at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:333:10)
at loadBuiltinModule (node:internal/modules/helpers:101:7)
at Module._load (node:internal/modules/cjs/loader:1001:17)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at Object.<anonymous> (/Users/mike/myapp/node_modules/whatwg-url/lib/url-state-machine.js:2:18)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
The trace leads back to the whatwg-url module, used by a dependency chain initiated by googleapis.
Specifically, the chain is as follows: googleapis > google-auth-library > gaxios > node-fetch > whatwg-url.
I understand that this warning does not currently affect functionality, but I thought it might be helpful to report this. I believe that I've done my due diligence to check that this has not been resolved or is already open. However, this is my first time opening an issue on a project, so pardon me if I've overlooked something.
Here is the output of npm ls whatwg-url for reference:
Unfortunately/fortunately, the only real, lasting option is an upgrade from node-fetch@2 to node-fetch@3 (or using the internal node fetch library). Why google is not on top of this, I do not know.
Environment details
Steps to reproduce
DeprecationWarning
in the console output.Note: The script is run with the
--trace-deprecation
flag to show where the warning was created.Expected behavior
No deprecation warnings should be displayed when using up-to-date and maintained dependencies within googleapis.
Actual behavior
A
DeprecationWarning
related to thepunycode
module is displayed in the console output. The warning is as follows:The trace leads back to the
whatwg-url
module, used by a dependency chain initiated bygoogleapis
.Specifically, the chain is as follows:
googleapis > google-auth-library > gaxios > node-fetch > whatwg-url
.I understand that this warning does not currently affect functionality, but I thought it might be helpful to report this. I believe that I've done my due diligence to check that this has not been resolved or is already open. However, this is my first time opening an issue on a project, so pardon me if I've overlooked something.
Here is the output of
npm ls whatwg-url
for reference: