[SOLVED] defineRouteMeta is not defined
See original GitHub issueEnvironment
- Operating System:
Windows_NT
- Node Version:
v18.1.0
- Nuxt Version:
3.0.0-rc.6
- Package Manager:
npm@8.8.0
- Builder:
vite
- User Config:
srcDir
,alias
- Runtime Modules:
-
- Build Modules:
-
Reproduction
No reproduction link. Just a nuxt 3 RC 6 project from scratch and a auth.global.js
in server/middleware
.
Describe the bug
login.vue:
<script setup>
defineRouteMeta({
auth: true
})
</script>
index.vue:
<template>
<div>
<h1>Nuxt App</h1>
<button @click="$router.push('/login')">Login</button>
</div>
</template>
app.vue:
<template>
<NuxtPage/>
</template>
Additional context
No response
Logs
No response
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
defineRouteMeta({}) compiler macro #2468 - nuxt/framework
In some cases we care about the route, not the page component specifically. ... We need to be able to define the layout...
Read more >Python nameerror name is not defined Solution - Career Karma
A NameError is raised when you try to use a variable or a function name that is not valid. In Python, code runs...
Read more >How to fix Name Not Defined Error in Python - YouTube
This video will explain how to solve the 'something' is not defined error in Python.
Read more >How to solve route not defined - php - Stack Overflow
Whenever I run my program, I get an error "Route [userproductss.prdtview] not defined. (View ...
Read more >The fullstack Angular meta-framework
Error: Unable to render WelcomeCard because it is undefined! Did you forget to import the ... If the solution is ok I can...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Silly me! Works like magic now! Appreciate your time and energy a lot. Will keep studying Nuxt 3, it’s promising!
Move
~/server/middleware/auth.global.ts
to~/middleware/auth.global.ts
. And no need to configure the@
alias.