TheComputerM / mystic-ui

Cool and beautiful animated components for SolidJS, crafted with Tailwind / PandaCSS and Motion One.
https://mystic-ui.vercel.app
MIT License
7 stars 0 forks source link

Module not Found on CLI `init` #1

Open atilafassina opened 5 days ago

atilafassina commented 5 days ago

Just ran pnpm dlx @mystic-ui/cli init in my project and got

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/.../node_modules/tailwindcss/defaultTheme' imported from /.../tailwind.config.mjs
Did you mean to import "tailwindcss/defaultTheme.js"?

right after the Welcome message. I already have tailwind installed, but my config is tailwind.config.ts and I'm using tailwindcss/defaultTheme there with no issues... 🤔

TheComputerM commented 2 days ago

I think the error occurs when cosmiconfig tries to load the config, which we don't really need, we just need the filepath

TheComputerM commented 2 days ago

You can create the mystic.config.json file manually, you won't face issues after that

{
  "framework": "tailwind",
  "configPath": "tailwind.config.ts",
  "outputPath": "./src/components/mystic-ui/",
  "tailwind": {
    "aliases": {
      "utils": "@/lib/utils"
    }
  }
}
atilafassina commented 2 days ago

thanks for that!! i'll try it out asap. I've been manually installing for now. Great work!!