Skip to content

Nuxt v5 / Nitro v3: unresolved import for nitropack/runtime during build #518

Description

@tobiasdiez

Environment

  • Package: nuxt-auth-utils 0.5.29
  • 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/nuxt-auth-utils@0.5.29_argon2@0.44.0/node_modules/nuxt-auth-utils/dist/runtime/server/plugins/oauth.js

import { defineNitroPlugin } from "nitropack/runtime";

Affected file

  • dist/runtime/server/plugins/oauth.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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions