formkit: nuxt 3 production build throws errors
Reproduction
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>
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (10 by maintainers)
@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.