Environment
- Package:
@nuxtjs/robots 5.7.1
- Nuxt:
https://pkg.pr.new/nuxt@95e6b9f
- Nitro:
3.0.260415-beta
- Vite:
7.3.1
Reproduction
Run pnpm build in a Nuxt v5 / Nitro v3 project using this package.
Actual result
The build emits UNRESOLVED_IMPORT warnings because the published runtime imports nitropack/runtime, which does not resolve in this setup.
[UNRESOLVED_IMPORT] Warning: Could not resolve 'nitropack/runtime' in node_modules/.pnpm/@nuxtjs+robots@5.7.1.../node_modules/@nuxtjs/robots/dist/runtime/server/plugins/initContext.js
import { defineNitroPlugin, getRouteRules } from "nitropack/runtime";
Affected files
dist/runtime/server/plugins/initContext.js
dist/runtime/server/routes/robots-txt.js
dist/runtime/server/util.js
dist/runtime/server/composables/useRuntimeConfigNuxtRobots.js
dist/runtime/server/composables/getPathRobotConfig.js
dist/runtime/server/composables/getBotDetection.js
dist/runtime/server/kit.js
Expected result
No unresolved import warnings when building with Nuxt v5 / Nitro v3.
Reference
Nuxt upgrade guide, migration to Nitro v3:
https://github.com/nuxt/nuxt/blob/main/docs/1.getting-started/18.upgrade.md#migration-to-nitro-v3
Environment
@nuxtjs/robots5.7.1https://pkg.pr.new/nuxt@95e6b9f3.0.260415-beta7.3.1Reproduction
Run
pnpm buildin a Nuxt v5 / Nitro v3 project using this package.Actual result
The build emits
UNRESOLVED_IMPORTwarnings because the published runtime importsnitropack/runtime, which does not resolve in this setup.Affected files
dist/runtime/server/plugins/initContext.jsdist/runtime/server/routes/robots-txt.jsdist/runtime/server/util.jsdist/runtime/server/composables/useRuntimeConfigNuxtRobots.jsdist/runtime/server/composables/getPathRobotConfig.jsdist/runtime/server/composables/getBotDetection.jsdist/runtime/server/kit.jsExpected result
No unresolved import warnings when building with Nuxt v5 / Nitro v3.
Reference
Nuxt upgrade guide, migration to Nitro v3:
https://github.com/nuxt/nuxt/blob/main/docs/1.getting-started/18.upgrade.md#migration-to-nitro-v3