Comments (7)
error.vue
is only work on 1 level route, ex: /foo
.
In multiple level route, the default page will display instead of the error.vue
, ex: /foo/bar
.
If I use function error({ statusCode: 404, message: 'Page not found' })
, error.vue
is not working too.
from nuxt.
Hi, that's right it not on the documentation yet but will comes soon but it's possible.
You need to create a /pages/_error.vue file.
There is an example here on how we use it on nuxtjs.org.
from nuxt.
Which probably refer's to this now: https://github.com/nuxt/nuxtjs.org/blob/3d1d3d02616283b3001e638b44c8b99a2ad4a23f/layouts/error.vue
from nuxt.
Is it possible to somehow change the value of title meta tag on error page?
from nuxt.
I'm using nuxt 1.1.1
and the following snippet does not work for me in error.vue. It works in other pages however.
head () {
return {
title: 'Error 404'
};
}
from nuxt.
@jamesAtcodeninja probably no such hook in the error case, since it's a minimal setup.
(What if whatever caused the error runs when trying to render a page displaying the error)
from nuxt.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from nuxt.
Related Issues (20)
- Error TS18028 during tsc in Nuxt 3 HOT 1
- When I set ssr to false, configured dynamic route [...slug].vue , click into the sub-page is normal, when I refresh in the sub-page appears in the picture, the link in the parameter for /classify/1/1 , classify for the route, /1/1 for the parameter, at this time to refresh on this error HOT 1
- Hello World example from doc not working HOT 1
- Server components cause hydration error when used inside resolved component HOT 1
- context.outputFileSystem.lstat is not a function HOT 3
- Nuxt > 3.8.1 <client-only> showing blank with "builder: webpack" HOT 4
- "joinRelativeURL" is not exported by "../../node_modules/ufo/dist/index.mjs", imported by "virtual:nuxt:C:/Users/MyPc/Workspace/my-project/apps/my-app/.nuxt/paths.mjs". HOT 2
- set `{ deep: false }` by default for data fetching composables HOT 1
- Improved Directory Structure HOT 44
- Minimize NuxtLink Size
- [Bug] [`@vue/compiler-sfc`] Read files based on Nuxt project/VFS in a monorepo HOT 1
- Add ability to prerender pages without including them in routes HOT 1
- After the first page jumps to the second page, click the back button again, the keep-alive of the first page does not take effect, and return to the first page still requests data again. HOT 1
- nuxt-client attribute doesn't hydrate a component inside a server component HOT 3
- Browser console warning when debugging HOT 1
- CSS HMR errors from Tailwind arbitrary value classes HOT 3
- 3.11.1 Pinia not working HOT 2
- Template installation error HOT 2
- Vue Dev Tools (Browser Extension) in Browser Inspector disappear when Nuxt Devtools are enabled HOT 5
- Cannot restart nuxt: Cannot read properties of undefined (reading 'toast') HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuxt.