Our DOM scripts are not found when using Next.js due to static imports, these can be built correctly so they are used like other source files in a package.
⨯ unhandledRejection: Error: ENOENT: no such file or directory, open '<some>/<path>/app/.next/server/dist/dom/build/xpathUtils.js'
at Generator.next (<anonymous>) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '<some>/<path>/app/.next/server/dist/dom/build/xpathUtils.js'
}
Reported here: https://stagehand-dev.slack.com/archives/C07UCP76U8G/p1731825603169509
Our DOM scripts are not found when using Next.js due to static imports, these can be built correctly so they are used like other source files in a package.