#RollupError: [plugin impound] Vue app aliases are not allowed in server runtime.

5 messages · Page 1 of 1 (latest)

delicate current
#

What is the issue?

Running nuxt dev results in this error:

[nitro 01:38:44]  ERROR  RollupError: [plugin impound] Vue app aliases are not allowed in server runtime. [importing #build/nuxt.config.mjs from node_modules/.pnpm/nuxt@4.4.2_@babel+core@7.29.0_@babel+plugin-syntax-jsx@7.28.6_@babel+core@7.29.0__@parc_8d508d11d905f0dce2f8a728bd6765b7/node_modules/nuxt/dist/app/nuxt.js]

Code:
  2 | import { createHooks } from "hookable";
  3 | import { getContext } from "unctx";
> 4 | import { appId, asyncCallHook, chunkErrorEvent, multiApp } from "#build/nuxt.config.mjs";
    |                                                                  ^
  5 | export function getNuxtAppCtx(id = appId || "nuxt-app") {
  6 |   return getContext(id, {

Suggestions:
  - Move this code to your Vue app directory or use a shared utility.

and attempting to load localhost:3000 just ends up with nothing happening.

What have you tried?

pnpm up, that's it so far.

pure deltaBOT
#

Hi @delicate current. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Vue App Aliases Not Allowed in Server Runtime

This error is triggered by the impound plugin, which enforces import protection in Nuxt — specifically blocking Vue app aliases (like #build/..., ~/, @/, etc.) from being used in the Nitro/server runtime context. [import protection]

The error you're seeing:

[plugin impound] Vue app aliases are not allowed in server runtime.
[importing #build/nuxt.config.mjs from ...nuxt/dist/app/nuxt.js]

indicates that something in the server context is pulling in a file that uses a Vue app alias (#build/nuxt.config.mjs), which is not permitted.

What the knowledge sources say

The import protection system blocks:

  • Vue app aliases (~/, @/, #build/, etc.) from being used in the Nitro/server context
  • Server directory imports from being used in the Vue/client context

[import protection]

A similar issue was reported where importing #app or #build/... aliases inside files that end up in the server context (e.g., app.config.ts) caused the same class of error. [defineAppConfig issue]

Recommendations

  1. Check for accidental server-side imports of Vue app code. If you have any server files (under server/) or shared files (under shared/) that import from #build/, #app, ~/, or @/, those need to be removed or refactored.

  2. Use the shared/ directory for code shared between Vue and Nitro. Code in shared/ cannot import any Vue or Nitro-specific code — it must be context-free. [shared directory]

#
  1. Use the #shared alias for importing from the shared directory in both app and server code. [shared directory]

  2. This may be a bug in Nuxt 4.4.2 itself. Since the error originates from inside node_modules/nuxt/dist/app/nuxt.js (not your own code), this could be an internal Nuxt regression. The knowledge sources do not contain enough information to confirm whether this specific version has a known bug. I'd recommend:

    • Checking the Nuxt GitHub issues for reports matching this error in v4.4.2
    • Trying to downgrade to a previous stable Nuxt version to confirm if it's version-specific

The knowledge sources do not explicitly describe a fix for this exact error originating from within Nuxt's own internals, so filing a bug report on the Nuxt repository would be the most appropriate next step.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@delicate current Kapa.ai is still learning and improving, please let me know how I did by reacting below.