formkit: Cannot find module '@formkit/themes/tailwindcss/genesis'
Reproduction
https://formkit.com/getting-started/installation
Describe the bug
The genesis theme is not found import genesis from '@formkit/themes/tailwindcss/genesis', per instructions for importing the Tailwind version of genesis theme https://formkit.com/getting-started/installation
Environment
• OS: [e.g. iOS] • Browser [e.g. chrome, safari] • Version [e.g. 22]
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 31 (13 by maintainers)
Everything working fine.
The correct import is without
distlike so:import genesis from '@formkit/themes/tailwindcss/genesis';but it looks like some module resolutions do not correctly get this, so in those cases you may need to change the module resolution of your application.With that in mind, we are recommending people to create a
themes.jsfile and copy the contents of the ts export there instead https://formkit.com/guides/create-a-tailwind-theme#a-complete-tailwind-theme-recreating-genesis-cssThank you for the response, but adding the
distpath also does not work for me. Please see the recreation on stackblitz here: https://stackblitz.com/edit/nuxt-starter-xv4bnr?file=package.json,nuxt.config.ts,formkit.config.ts,app.vue,tailwind.config.jsThe error in the image is what shows up for me.
Below is a snapshot of my
node_modulesfolder:works like a charm, thank you so much @andrew-boyd 🙏🏼
This has been published under the
@nexttag@aerophobic @michelveloso can you try
1.0.0-beta.15-3995886which can be installed with the@devtag? Should be working. I’ll publish it under the@nexttag shortly.I will take a look thank you.
Same error in Nuxt 3
am still having the issue with nuxt this is the error
[vite] Internal server error: Missing “./dist/tailwindcss/genesis” export in “@formkit/themes” package
Looks like the genesis export alias didn’t make it to the
package.jsonfor the@formkit/themespackage. Changing the import to include the/dist/directory in the path will work for the time being.so this:
import genesis from '@formkit/themes/tailwindcss/genesis'becomes:
import genesis from '@formkit/themes/dist/tailwindcss/genesis'