Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: TanStack Start installation - component was not found error when installing component #7084

Open
2 tasks done
jamezening opened this issue Mar 30, 2025 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@jamezening
Copy link

Describe the bug

When installing with TanStack Start, referred to #7018 to get npx shadcn@canary init to run.

But when attempting to add button component using npx shadcn@canary add button, getting the following error.

✔ Preflight checks.
✔ Verifying framework. Found TanStack Start.
✔ Validating Tailwind CSS config. Found v4.
✔ Validating import alias.
✔ Which color would you like to use as the base color? › Neutral
✔ Writing components.json.
✔ Checking registry.
✔ Updating CSS variables in app/styles/app.css
  Installing dependencies.

It looks like you are using React 19. 
Some packages may fail to install due to peer dependency issues in npm (see https://ui.shadcn.com/react-19).

✔ How would you like to proceed? › Use --force
✔ Installing dependencies.
✔ Created 1 file:
  - app/lib/utils.ts

Success! Project initialization completed.
You may now add components.

But when attempting to add button component using npx shadcn@canary add button, getting the following error.

Something went wrong. Please check the error below for more details.
If the problem persists, please open an issue on GitHub.

The component at https://ui.shadcn.com/r/styles//button.json was not found.
It may not exist at the registry. Please make sure it is a valid component.

components.json has style set to new-york.

components.json

{
  "$schema": "https://ui.shadcn.com/schema.json",
  "style": "new-york",
  "rsc": false,
  "tsx": true,
  "tailwind": {
    "config": "",
    "css": "app/styles/app.css",
    "baseColor": "neutral",
    "cssVariables": true,
    "prefix": ""
  },
  "aliases": {
    "components": "@/components",
    "utils": "@/lib/utils",
    "ui": "@/components/ui",
    "lib": "@/lib",
    "hooks": "@/hooks"
  },
  "iconLibrary": "lucide"
}

It seems that the style is being left out when installing from the registry?

Here are the relevant package.json dependencies/versions.

package.json

  ...
  "dependencies": {
    "@tailwindcss/postcss": "^4.0.17",
    "@tanstack/react-router": "^1.114.29",
    "@tanstack/react-start": "^1.114.30",
    "@tanstack/start": "^1.114.30",
    "class-variance-authority": "^0.7.1",
    "clsx": "^2.1.1",
    "lucide-react": "^0.485.0",
    "postcss": "^8.5.3",
    "react": "^19.1.0",
    "react-dom": "^19.1.0",
    "tailwind-merge": "^3.0.2",
    "tailwindcss": "^4.0.17",
    "tw-animate-css": "^1.2.5",
    "vinxi": "^0.5.3"
  },
  "devDependencies": {
    "@types/react": "^19.0.12",
    "@types/react-dom": "^19.0.4",
    "@vitejs/plugin-react": "^4.3.4",
    "typescript": "^5.8.2",
    "vite-tsconfig-paths": "^5.1.4"
  }
  ...

Affected component/components

Button

How to reproduce

  1. Follow TanStack Start setup.
  2. error when adding component - npx shadcn@canary add button

Codesandbox/StackBlitz link

No response

Logs

System Info

> package.json


  ...
  "dependencies": {
    "@tailwindcss/postcss": "^4.0.17",
    "@tanstack/react-router": "^1.114.29",
    "@tanstack/react-start": "^1.114.30",
    "@tanstack/start": "^1.114.30",
    "class-variance-authority": "^0.7.1",
    "clsx": "^2.1.1",
    "lucide-react": "^0.485.0",
    "postcss": "^8.5.3",
    "react": "^19.1.0",
    "react-dom": "^19.1.0",
    "tailwind-merge": "^3.0.2",
    "tailwindcss": "^4.0.17",
    "tw-animate-css": "^1.2.5",
    "vinxi": "^0.5.3"
  },
  "devDependencies": {
    "@types/react": "^19.0.12",
    "@types/react-dom": "^19.0.4",
    "@vitejs/plugin-react": "^4.3.4",
    "typescript": "^5.8.2",
    "vite-tsconfig-paths": "^5.1.4"
  }
  ...

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues
@jamezening jamezening added the bug Something isn't working label Mar 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant