Open beysach opened 2 months ago
You need to add
"paths": {
"@/*": ["./*"]
}
To your tsconfig. So shadcn can use @ for imports.
You need to add
"paths": { "@/*": ["./*"] }
To your tsconfig. So shadcn can use @ for imports.
I mean, when the project is first initialized, tsconfig and jsconfig haven't been created yet.
Having this issue aswell, I cant even create a laravel project following shadcn's documentation.
https://ui.shadcn.com/docs/installation/laravel
Tells me I cant use --typescript and when I install it manually I get that issue
same here, the issue still persist, any solution about this?
I found the solution: you need to first create a tsconfig.json
file in the project root, and then run the installation command
{
"compilerOptions": {
"paths": {
"@/*": ["./*"]
}
}
}
then run the command npx shadcn@latest init
This Worked to me Thanks Dude.
Thanks @raviMukti. Worked for me
Describe the bug
Cannot Install shadcn-ui on Laravel Inertia React while using Javascript .jsx ✔ Preflight checks. ✔ Verifying framework. Found Laravel. ✔ Validating Tailwind CSS. ✖ Validating import alias.
No import alias found in your tsconfig.json file. Visit https://ui.shadcn.com/docs/installation/laravel to learn how to set an import alias.
Affected component/components
npx shadcn@latest init
How to reproduce
npx shadcn@latest init
Codesandbox/StackBlitz link
No response
Logs
No response
System Info
Before submitting