NUXT_E7001: Payload URL includes a hostname
The error E7001 occurs when a payload URL is requested with a full URL that includes a hostname. Payloads are always served from the same origin as the app, so a URL with a hostname points outside the app and is rejected. To resolve this, pass a relative path instead of a full URL to loadPayload().
E7001: Correct payload URL format
Use loadPayload() with a relative path. Example: loadPayload('/some-page'). Do not use a full URL with hostname, as payloads are always served from the same origin.
NUXT_E7007: useState init must be a function
The `useState()` composable requires the initial value parameter to be a function, not a direct value. The initializer function ensures the state is initialized only once on the server and its result can be serialized into the payload for hydration.
E7008 error: callOnce() requires a function argument
The E7008 error occurs when callOnce() receives a non-function argument as its fn parameter. The first argument after the key must be a function so that Nuxt can execute it a single time and skip it on subsequent calls.
callOnce() correct usage example
await callOnce('setup', () => {
// runs once
})
This example shows the correct syntax: the second argument must be a function that will be executed once.
callOnce correct usage example
await callOnce('setup', () => { // runs once })
callOnce key must be a string
The callOnce() utility requires the first argument to be a non-empty string. This key is used to track whether the function has already run. Passing a non-string value will cause error E7010.
E8007 resolution: use route rules to scope noScripts
To resolve E8007, either remove the client-side dependency from the affected route, or use the noScripts route rule to scope script stripping to only routes that are genuinely static. The route rule applies in development too, so any breakage becomes visible immediately during development. Example: export default defineNuxtConfig({ routeRules: { '/static/**': { noScripts: true } } })
E8007 error: route relies on client-side JavaScript but noScripts strips scripts
Error E8007 occurs when a route depends on client-side JavaScript but the noScripts feature is enabled with its default setting of 'production'. With features.noScripts: 'production', scripts are stripped from rendered HTML only in production builds. This means behavior depending on JavaScript (lazy hydration strategies, nuxt-client components inside server components) works correctly in development but silently breaks after deployment to production.
E8007 resolution: use features.noScripts 'all' to strip scripts in development
An alternative resolution for E8007 is to set features.noScripts: 'all' to strip scripts in both development and production builds. This makes the production behavior observable in development, allowing you to catch issues earlier.
experimental.parseErrorData forced on in Nuxt 5
`experimental.parseErrorData` is deprecated and forced to true in Nuxt 5. Setting it to false logs a warning and is ignored. The error is now sent as a single JSON-encoded parameter, so `error.data` keeps its original shape and never gets stringified. Remove the option from nuxt.config. If previously parsing `error.data` yourself, drop that parsing as values keep their types.
Nitro v3 error properties renamed
In Nitro v3, h3 v2 renames error properties to align with Web standards. Replace `statusCode` with `status` and `statusMessage` with `statusText`. In server routes, use `new HTTPError({ status: 404, statusText: 'Not Found' })` instead of `createError({ statusCode: 404, statusMessage: 'Not Found' })`. In the Vue part of the app (app/ directory), Nuxt's `createError` composable continues to work and is the recommended way to throw errors.
createError no longer returns HTTPError instance
`NuxtError` is now its own class rather than a subclass of h3's `HTTPError`, so `instanceof HTTPError` no longer matches an error created with Nuxt's `createError`. Use predicates instead: `HTTPError.isError(error)` to handle both `new HTTPError()` and Nuxt's `createError()`, or `isNuxtError(error)` to narrow to errors created with Nuxt's `createError`.
Error when composable called without context access
If a composable that requires access to the Nuxt instance is called outside of a plugin, Nuxt hook, Nuxt middleware, or Vue setup function, an error is thrown stating: 'A composable that requires access to the Nuxt instance was called outside of a plugin, Nuxt hook, Nuxt middleware, or Vue setup function.'