Skip to content

ReferenceError: DOMParser is not defined - cloudflare wranger deployment #7375

@srinathreddydudi

Description

@srinathreddydudi

Checkboxes for prior research

Describe the bug

The recent DomParser change implemented in #7347 seems to break cloudflare's wranger deployments. Wasn't exactly sure if this needs to be addressed on cloudflare end or on this repo. So posting it in both the places.

Bug report on cloudflare: cloudflare/workers-sdk#10755

Error Message:   Uncaught ReferenceError: DOMParser is not defined
    at null.<anonymous> (file:///home/runner/work/*****/node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.browser.js:1:16)

Regression Issue

  • Select this option if this issue appears to be a regression.

SDK version number

@aws-sdk/aws-sdk-js-v3@v3.894.0

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

cloudflare wrangler

Reproduction Steps

  • install latest version in cloudflare workers code
  • push a deployment using wrangler

Observed Behavior

throwing error Uncaught ReferenceError: DOMParser is not defined

Expected Behavior

no error should be reported.

Possible Solution

No response

Additional Information/Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions