Skip to content

ogygia warning

jumpstart_file_beside

jumpstart: ‹count› may read a file beside a module the server bundle moves: ‹list›

jumpstart() bundles every dependency into the server build, so a module no longer sits in its package's folder. A module that reads a file next to itself (new URL('./data.wasm', import.meta.url), path.join(__dirname, 'x.json'), its folder from import.meta.url joined where it is found or held in a variable and joined, import.meta.resolve('./x'), a createRequire require of a relative path) then looks in the wrong place, and fails when it runs: the first time a page that imports it loads. The build cannot tell whether the read happens, so this line names each package whose code has such a path.

After the build, load a page that imports each named package once. A package that fails there goes in jumpstart({ external }), so it stays in node_modules beside its files.

Every error and warning