Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-5709

Deprecation warning due to the tr46 module in the dependency chain

    • Not Needed
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      When using the MongoDB Node.js driver, a deprecation warning related to the punycode module is being thrown. After investigating, it appears this warning originates from the tr46 module, a dependency of the whatwg-url package. This, in turn, is a dependency for mongodb-connection-string-url, which the MongoDB Node.js driver utilizes.

      The exact warning message is:

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

      Steps to Reproduce:

      1. Install the MongoDB Node.js driver.
      2. Connect to a MongoDB instance using the driver.
      3. Observe the deprecation warning in the console output.

      Expected Behavior:
      No deprecation warnings should be thrown when using the MongoDB Node.js driver.

      Actual Behavior:
      A deprecation warning related to the punycode module, stemming from the tr46 module, is shown.

      Environment Details:

      • MongoDB Node.js Driver Version: 6.1.0
      • Node.js Version: v21.0.0
      • Operating System: Windows 11

      Additional Context:
      The dependency chain causing this issue seems to be:

      mongodb -> mongodb-connection-string-url -> whatwg-url -> tr46

      It would be great if this could be addressed, as such warnings can be concerning for users and might become breaking changes in future Node.js releases.

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            desaisoftwaree@gmail.com software desai
            Durran Jordan
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: