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

Angular 18 SSR whatwg-url failure

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: None
    • Component/s: None
    • 1
    • 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?

      Use Case

      As a developer I want to connect to mongodb from Angular SSR node backend.

      User Experience

      unable to connect to the database due to whatwg-url package as mentioned here

      My error msg:

      file:///C:/PROJECTS/PartexWebsiteFrontend/site/dist/partex-website/server/en/server.mjs:56447
          var AsyncIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf(function() {
                                              ^

      TypeError: Cannot convert undefined or null to object
          at Function.getPrototypeOf (<anonymous>)
          at node_modules/whatwg-url/lib/utils.js (file:///C:/PROJECTS/PartexWebsiteFrontend/site/dist/partex-website/server/en/server.mjs:56447:41)
          at __require2 (file:///C:/PROJECTS/PartexWebsiteFrontend/site/dist/partex-website/server/en/chunk-ITE73WAF.mjs:48:50)
          at node_modules/whatwg-url/lib/URL.js (file:///C:/PROJECTS/PartexWebsiteFrontend/site/dist/partex-website/server/en/server.mjs:59335:17)
          at __require2 (file:///C:/PROJECTS/PartexWebsiteFrontend/site/dist/partex-website/server/en/chunk-ITE73WAF.mjs:48:50)
          at node_modules/whatwg-url/webidl2js-wrapper.js (file:///C:/PROJECTS/PartexWebsiteFrontend/site/dist/partex-website/server/en/server.mjs:59744:16)
          at __require2 (file:///C:/PROJECTS/PartexWebsiteFrontend/site/dist/partex-website/server/en/chunk-ITE73WAF.mjs:48:50)
          at node_modules/whatwg-url/index.js (file:///C:/PROJECTS/PartexWebsiteFrontend/site/dist/partex-website/server/en/server.mjs:59760:9)
          at __require2 (file:///C:/PROJECTS/PartexWebsiteFrontend/site/dist/partex-website/server/en/chunk-ITE73WAF.mjs:48:50)
          at node_modules/mongodb-connection-string-url/lib/index.js (file:///C:/PROJECTS/PartexWebsiteFrontend/site/dist/partex-website/server/en/server.mjs:59900:24)

       

      This problem is also described here:

      https://github.com/angular/angular-cli/issues/27880

      https://github.com/angular/angular-cli/issues/27755

      https://github.com/jsdom/whatwg-url/issues/274

      Acceptance Criteria

      Implementation Requirements

      • remove whatwg-url dependency

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            polif7@gmail.com Oliwia Potwardowska
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: