You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We’re encountering a problem with Next.js (v15) when using the latest version of isomorphic-dompurify (2.28.0) on Node.js v22.x (both locally and on Vercel).
Error (Next.js v15, Node 22.x, during server start):
Error: ENOENT: no such file or directory, open '.../.next/browser/default-stylesheet.css'
at 80131 (.next/server/chunks/9049.js:80:184774)
at c (.next/server/webpack-runtime.js:1:485)
at 82681 (.next/server/chunks/9049.js:81:31137)
at c (.next/server/webpack-runtime.js:1:485)
at 86282 (.next/server/chunks/9049.js:82:267932)
at c (.next/server/webpack-runtime.js:1:485)
at 57165 (.next/server/chunks/9049.js:71:5350)
at c (.next/server/webpack-runtime.js:1:485)
at 29511 (.next/server/chunks/9049.js:21:403122) {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '.../.next/browser/default-stylesheet.css'
}
Workaround
Adding the following to next.config.ts resolves the build for now: serverExternalPackages: ["isomorphic-dompurify", "jsdom"]