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
dist
like 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.js
file 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
dist
path 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_modules
folder:works like a charm, thank you so much @andrew-boyd 🙏🏼
This has been published under the
@next
tag@aerophobic @michelveloso can you try
1.0.0-beta.15-3995886
which can be installed with the@dev
tag? Should be working. I’ll publish it under the@next
tag 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.json
for the@formkit/themes
package. 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'