Skip to content

t.createWindow error when upgrade to next.js 15.2.5 or 15.3.1 #330

@flanker

Description

@flanker

"isomorphic-dompurify": "^2.21.0",
"next": "15.3.1",
"react": "19.1.0",
"react-dom": "19.1.0",

[email protected]:
dependencies:
dompurify: 3.2.4
jsdom: 26.0.0

Stack Trace

TypeError: s is not a function

./node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/jsdom/browser/Window.js in t.createWindow at line 132:1

      Object.defineProperty(window, globalName, propDesc);
    }
  }
  // Create instances of all the web platform interfaces and install them on the window.
  installInterfaces(window, ["Window"]);
  // Now we have an EventTarget contructor so we can work on the prototype chain.
  // eslint-disable-next-line func-name-matching, func-style
  const WindowConstructor = function Window() {

./node_modules/.pnpm/[email protected]/node_modules/jsdom/lib/api.js in new w at line 36:1

    const mimeType = new MIMEType(options.contentType === undefined ? "text/html" : options.contentType);
    const { html, encoding } = normalizeHTML(input, mimeType);
    options = transformOptions(options, encoding, mimeType);
    this[window] = createWindow(options.windowOptions);
    const documentImpl = idlUtils.implForWrapper(this[window]._document);
    options.beforeParse(this[window]._globalProxy);

./node_modules/.pnpm/[email protected]/node_modules/isomorphic-dompurify/index.js in global.DOMPurify at line 1:223

{snip} ("dompurify")):function(){const r=e(require("dompurify")),{JSDOM:u}=e(require("jsdom")),{window:o}=new u("<!DOCTYPE html>");return r(o)}());

./node_modules/.pnpm/[email protected]/node_modules/isomorphic-dompurify/index.js in exports.modules at line 1:261

{snip} ("dompurify")):function(){const r=e(require("dompurify")),{JSDOM:u}=e(require("jsdom")),{window:o}=new u("<!DOCTYPE html>");return r(o)}());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions