isomorphic-dompurify icon indicating copy to clipboard operation
isomorphic-dompurify copied to clipboard

TypeError: s is not a function at t.createWindow

Open pranavks opened this issue 7 months ago • 3 comments

Started getting this error from today in Next.js 15.1.4. This happens only at runtime in production builds.

There's a similar issue about the same error for Next.js 15.2.+. I think the latest releases made the issue appear in more Next.js versions.

 ⨯ TypeError: s is not a function
    at t.createWindow (.next/server/chunks/4222.js:21:559269)
    at new w (.next/server/chunks/4222.js:21:554535)
    at <unknown> (.next/server/chunks/4222.js:4:60472)
    at 18175 (.next/server/chunks/4222.js:4:60509)
    at t (.next/server/webpack-runtime.js:1:511)
    at 271813 (.next/server/chunks/4284.js:1:12074)
    at t (.next/server/webpack-runtime.js:1:511)
    at 892212 (.next/server/chunks/4284.js:1:10120)
    at t (.next/server/webpack-runtime.js:1:511)
    at 226159 (.next/server/app/(frontend)/blog/[slug]/page.js:1:8558)

pranavks avatar Jul 10 '25 14:07 pranavks

Thanks for reporting @pranavks . What's your isomorphic-dompurify version? Did you try https://github.com/kkomelin/isomorphic-dompurify/releases/tag/2.26.0 ?

kkomelin avatar Jul 10 '25 14:07 kkomelin

Yes i got the issue with 2.26.0 @kkomelin

Another thing is for some reason the issue happens on random builds for me. So if you're trying to reproduce I'd suggest few retries.

pranavks avatar Jul 10 '25 15:07 pranavks

@pranavks Ah, interesting. Thank you

kkomelin avatar Jul 11 '25 09:07 kkomelin