- Add await to fs.mkdir() call in generateDevices() (line 60). Without
this, writeFile can race ahead of directory creation, causing ENOENT
on clean builds or slower machines.
- Add 'node:module' to the externals array. Node.js treats 'module' and
'node:module' as distinct specifiers; esbuild fails to resolve the
prefixed form when bundling for the browser target.
Discovered during Docker builds on ARM64 where the race window is wider
due to slower I/O. Also reproduces on x86_64 with a clean src/pack/.