hngngn / shadcn-solid

shadcn/ui, but for Solid.
https://shadcn-solid.com
MIT License
166 stars 11 forks source link

[bug]: Invalid configuration #79

Closed castrogarciajs closed 1 month ago

castrogarciajs commented 1 month ago

Describe the bug

Description

I am trying to add the Carousel component. And the CLI throws a configuration error I was investigating the problem it seems that the CLI npx shadcn-solid@latest init is not generating the correct schema.json properties.

Setup components.json

{
  "$schema": "https://shadcn-solid.com/schema.json",
  "tailwind": {
    "config": "tailwind.config.mjs",
    "css": "src/app.css",
    "baseColor": "neutral",
    "cssVariables": true,
    "prefix": ""
  },
  "aliases": {
    "components": "@/components",
    "utils": "@/utils/cn"
  }
}

Missing property

image

Linter

image

image

tells me that the css property must be an object

This components.json works

{
  "$schema": "https://shadcn-solid.com/schema.json",
  "tailwind": {
    "config": "tailwind.config.mjs",
    "css": { "path": "src/app.css" },
    "color": "neutral",
    "cssVariables": true,
    "prefix": ""
  },
  "alias": {
    "component": "@/components",
    "cn": "@/utils/cn"
  }
}

Affected component/components

No

How to reproduce

  1. npx shadcn-solid@latest init
  2. Run pnpm dlx shadcn-solid@latest add carousel
  3. ■ Invalid configuration found in D:\dev\castrogarciajs/components.json.

Codesandbox/StackBlitz link

No response

Logs

➜ castrogarciajs git:(master) pnpm dlx shadcn-solid@latest add carousel
│
■  Invalid configuration found in D:\dev\castrogarciajs/components.json.

System Info

[Package manager]: pnpm@9.1.1
[Browser]: Microsoft Edge
[System]: Windows 10

Before submitting

hngngn commented 1 month ago

Are you sure you on the latest version? Everything work fine to me