nuxt 3 production build throws errors
See original GitHub issueReproduction
Describe the bug
Hi @justin-schroeder @pi0 Thank you for all the amazing work.
I have installed the recent nuxt 3 and formkit beta4/5 in both If I do do
yarn build
and then yarn start
It throws errors.
But in development mode yarn dev
it works just fine.
To reproduce you can add a formkit to any page and do a yarn build
and then yarn start
then load the page containing the form.
Let me know If you want to track in another issue
Environment
• OS: [e.g. iOS] LINUX • Browser [e.g. chrome, safari] ALL • Version [e.g. 22] irrelevant
Install nuxt 3 install formkit beta4/5
Error: E600
at error (file:///projectDir/.output/server/node_modules/@formkit/vue/node_modules/@formkit/core/dist/index.mjs:194:11)
at useInput (file:///projectDir/.output/server/node_modules/@formkit/vue/dist/index.mjs:873:9)
at setup (file:///projectDir/.output/server/node_modules/@formkit/vue/dist/index.mjs:666:22)
at callWithErrorHandling (file:///projectDir/.output/server/chunks/index.mjs:1957:22)
at setupStatefulComponent (file:///projectDir/.output/server/chunks/index.mjs:7517:29)
at setupComponent (file:///projectDir/.output/server/chunks/index.mjs:7498:11)
at renderComponentVNode (file:///projectDir/.output/server/chunks/index.mjs:9853:17)
at Object.ssrRenderComponent (file:///projectDir/.output/server/chunks/index.mjs:10284:12)
at _sfc_ssrRender$1 (file:///projectDir/.output/server/chunks/app/server.mjs:6093:32)
at renderComponentSubTree (file:///projectDir/.output/server/chunks/index.mjs:9924:13)
[Vue warn]: Component is missing template or render function.
[Vue warn]: inject() can only be used inside setup() or functional components.
[Vue warn]: inject() can only be used inside setup() or functional components.
test.vue contents
<template>
<FormKit
:type="'text'"
label="Category Name"
help="name of the Category to be used"
/>
<FormKit
:type="'text'"
label="slug/handle"
help="the path that will be used in the URLS"
/>
</template>
Issue Analytics
- State:
- Created 2 years ago
- Comments:17 (10 by maintainers)
Top Results From Across the Web
Error page does not work in production mode #6869 - GitHub
The exception should be caught by the Nuxt main error handler which displays a nice error page, as it happens when running in...
Read more >nuxt 3 production mode throws "process is not defined"
I am running a nuxt 3 app in non server mode ssr: false . It runs fine in development mode but as soon...
Read more >Error handling · Get Started with Nuxt
Learn how to catch errors in different lifecycle. Handling Errors. Nuxt 3 is a full-stack framework, which means there are several sources of...
Read more >Creating Server-side Rendered Vue.js Apps Using Nuxt.js
For example, when generating the example project, the nuxtServerInit function throws an error because it's trying to fetch a token from the cookies...
Read more >Nuxt error. js DX. 0build: Returned: code: 1 signal
034b9901 Package Manager: npm Bundler: Webpack User Config: target, ssr Javascript nuxt throws 'the "path" argument must be of type string' or console...
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
@msonowal ok, try upgrading
@formkit/nuxt
to the latestnext
tag (1.0.0-beta.6-4e39485
) I think its resolved thanks to a helpful comment from Daniel Roe over on the nuxt repository.@msonowal this looks like it might be a bug in the nuxt nitro server. I’m going to start trying to create reproductions using non-formkit code to confirm, but it looks like the same bug as this: https://github.com/nuxt/framework/issues/2964
In the meantime if you just wrap your FormKit code in
<ClientOnly>
everything should work: