nitro icon indicating copy to clipboard operation
nitro copied to clipboard

readAsset build error

Open zhyc9de opened this issue 7 months ago • 1 comments

https://github.com/nitrojs/nitro/blob/8c2a2d8589a1c65b091f8bce1ca25d756f25bb11/src/build/plugins/public-assets.ts#L78C1-L79C1

This is the code that I actually compiled

function readAsset (id) {
  const serverDir = dirname(fileURLToPath(import.meta.url));
  return promises.readFile(resolve$1(serverDir, assets[id].path))
}

the global variable was not referenced, so the _nuxt file could not be found

Image

my env node v22.15.1

zhyc9de avatar May 28 '25 03:05 zhyc9de

Please provide a minimal reproduction (e.g., Stackblitz or a Github repo) so we can debug 🙏

kricsleo avatar May 28 '25 13:05 kricsleo