Replies: 13 comments 6 replies
-
i have same issue when i using remix, i got error in validating tailwind css and validating import alias, so for now i create manual my components.json and install a several library like
|
Beta Was this translation helpful? Give feedback.
-
Having the same issue with Vite 5.4.2, I tried adding the alias to tsconfig.app.json, tsconfig.json and tsconfig.node.json |
Beta Was this translation helpful? Give feedback.
-
you need to add
|
Beta Was this translation helpful? Give feedback.
-
Expanding on the issue, this doesn't work:
But it works if I change "./lib/*" for "./src/*", not sure if this is an expected behavior, but I will move my UI library code to ./src for now. |
Beta Was this translation helpful? Give feedback.
-
this setup worked for me if you are importing component like this |
Beta Was this translation helpful? Give feedback.
-
this one worked for me
|
Beta Was this translation helpful? Give feedback.
-
The path can't be anything else than |
Beta Was this translation helpful? Give feedback.
-
Strange behavior when its working only with Well, as I found out its not that hard to update |
Beta Was this translation helpful? Give feedback.
-
The following fixes the situation: --- a/webapps/web1/tsconfig.json
+++ b/webapps/web1/tsconfig.json
@@ -6,7 +6,7 @@
"allowJs": true,
"baseUrl": ".",
"jsx": "preserve",
- "paths": { "@/*": ["src/*"] }
+ "paths": { "@/*": ["./src/*"] }
},
"include": ["next-env.d.ts", "src/**/*.ts", "src/**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"] |
Beta Was this translation helpful? Give feedback.
-
i added |
Beta Was this translation helpful? Give feedback.
-
Hello,
And finally tested to load my config like that
You should be able to get enough feedback from that to identify the problem in your config. Like mine was that I declared the Reference from the shadcn code too: ui/packages/cli/src/utils/get-project-info.ts Line 157 in 0873835 |
Beta Was this translation helpful? Give feedback.
-
The tool now gives a link to the docs on how to use it with vite, which may have been updated recently. I have in my tsconfig.json file:
|
Beta Was this translation helpful? Give feedback.
-
If you are not using typescript, make sure the tsconfig.json file does not exist, if it does, remove it. |
Beta Was this translation helpful? Give feedback.
-
I'm brand new to electron and vite; I created an electron project from this template: https://github.com/electron-vite/electron-vite-react
Here are the contents of
tsconfig.json
:As you can see, I do have the paths prop defined, and it looks to match what is in the shadcn vite docs. The template also comes pre-packaged with tailwind, and it appears to be working fine.
When running the command
npx shadcn@latest init
, I get the following error in my terminal:What obvious thing am I missing?
Beta Was this translation helpful? Give feedback.
All reactions