firebase / firebase-tools

The Firebase Command Line Tools
MIT License
4.03k stars 944 forks source link

Deprecation Warning: punycode Module in Firebase CLI v13.22.0 Using Node.js v21.2.0 #7822

Closed njvb closed 1 month ago

njvb commented 1 month ago

[REQUIRED] Environment info

firebase-tools: 13.22.0

Platform: macOS Monterey 12.3

[REQUIRED] Test case

This issue pertains to a deprecation warning emitted by the Firebase CLI during the deployment process. There is no specific code or test case involved.

[REQUIRED] Steps to reproduce

  1. Ensure Environment Setup:

    • Node.js Version: v21.2.0
    • Firebase CLI Version: 13.22.0
    • Operating System: macOS Monterey 12.3
  2. Run the Deployment Command: firebase deploy --only hosting

  3. Observe the Deprecation Warning in the Terminal Output.

[REQUIRED] Expected behavior

The Firebase CLI should deploy the project without emitting any deprecation warnings related to the `punycode` module, ensuring a clean and warning-free deployment process.

[REQUIRED] Actual behavior

During deployment, the Firebase CLI emits a deprecation warning for the `punycode` module. This warning originates from the `whatwg-url` package, which is a dependency of `firebase-tools`. The warning message is as follows:

(node:10469) [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:392:7)
    at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:328: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/njvan/.nvm/versions/node/v21.2.0/lib/node_modules/firebase-tools/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)

[REQUIRED] Additional Information

(node:10469) [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:392:7)
    at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:328: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/njvan/.nvm/versions/node/v21.2.0/lib/node_modules/firebase-tools/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)

Suggested Action:

Update the whatwg-urldependency within firebase-tools to eliminate the use of the deprecated punycode module. This update will ensure compatibility with newer Node.js versions and prevent deprecation warnings during deployments.

google-oss-bot commented 1 month ago

This issue does not seem to follow the issue template. Make sure you provide all the required information.

aalej commented 1 month ago

Hey @njvb, thanks for reaching out and for providing details of what you observed. Looking through the provided information, it seems like this is a similar issue to #7747.

To keep a single line of communication, I'll be closing this as a duplicate. Could you please leave a comment or a thumbs up on the original issue. If you think this is a mistake, feel free to ask this to be reopened.