-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[worker] definePageMeta is not defined #13292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Plausible solution is listed in this answer: https://github.com/nuxt/framework/discussions/2770#discussioncomment-2005938, yet I was not able to execute it on nuxt3:latest |
For me it with Layout. and i get the following error in chrome console
|
@Moskovskiy #13285 same problem here, I guess |
This codesandbox is working for me as far as the @Oldwo1f - If anyone else is experiencing this issue, would you prepare a reproduction? |
Apparently this has to do something with the following warning
(manual installation does nothing) |
Ok i see. I am indeed using nuxt bridge. |
hi there. i am back to this topic. I really need to use more than one layout on my nuxt-bridge app. Since definePageMeta is not working in nuxt bridge, I wonder if anyone have a work around. |
Reproduction is kinda easy to create.
|
@Oldwo1f In Nuxt Bridge, you still set the layout the same way you always have. You can create a second script block just to do this. See https://github.com/antfu/unplugin-vue2-script-setup#component-meta |
@Moskovskiy I can't replicate even with the codesandbox - it appears to be working fine. Would you update the reproduction so it fails? Or create a GitHub repository and share the code with me? I would suggest deleting your |
This is working like a charm. |
I encountered this issue in my project, but completely removing |
I'm going to close this issue. We've implemented a helper in Nuxi to clear the vite cache (which was the likely culprit) automatically on upgrade. If anyone experiences this in future, even after trying the steps above, please create a new issue with a reproduction. |
https://github.com/nuxt/framework/issues/2920#issuecomment-1032284797 Nuxt Bridge can still use old syntax instead.
I had same problem and searched a lot. Somewhere is written definePageMeta is only nuxt3 feature and not supported for nuxt bridge. But then i found this link and i get i to work! U have to add macros to bridge setup:
and after this its working for me :) PS - make sure u have latest bridge version |
Uh oh!
There was an error while loading. Please reload this page.
Environment
Darwin
v16.13.1
3.0.0-27385496.7a1cf62
[email protected]
Vite
head
,css
,build
-
-
Reproduction
https://codesandbox.io/s/hardcore-grass-965dh?file=/pages/index.vue
Describe the bug
Instructions from official Nuxt3 tutorial can't be executed

Additional context
Check out this topic: https://github.com/nuxt/framework/discussions/2770
Any of flows:
will result in lack of definePageMeta
In this example I use definePageMeta for middleware, but it doesn't depend on it (this is not the source of the error)
I do get the following warning though:
[Vue warn]: Unhandled error during execution of setup function
at <Index onVnodeUnmounted=fn ref=Ref< undefined > key="/some_page" >
definePageMeta is not defined
at setup (file://./.nuxt/dist/server/server.mjs:11102:1)
Logs
The text was updated successfully, but these errors were encountered: