ui
ui copied to clipboard
init command creates a @ directory instead of using tsconfig paths (Remix) (Linux)
Following the guide on here:
https://ui.shadcn.com/docs/installation/remix
Gives me the following structure
/home/dan/dev/para-mvp
◌ .cache
.git
@ // this is not right
components
lib
✗ app
✗ routes
✗ _index.tsx
entry.client.tsx
entry.server.tsx
globals.css
root.tsx
◌ build
◌ node_modules
public
.eslintrc.cjs
.gitignore
.prettierrc.json
components.json
package-lock.json
package.json
postcss.config.js
README.md
remix.config.js
remix.env.d.ts
✗ tailwind.config.js
tsconfig.json
As you can see it seems to create a directory called @
instead of components
with a tsconfig path alias
Reproduction repo
https://github.com/dan-cooke/shadcn-remix-bug
Expected behaviour
I should have a directory called components
at the top level, and no directory called @
Problem
If this is intentional (for whatever reason) the tailwind config should be updated to find this file
content: [
'./pages/**/*.{ts,tsx}',
+++ './@/**/*.{ts,tsx}',
'./components/**/*.{ts,tsx}',
'./app/**/*.{ts,tsx}',
'./src/**/*.{ts,tsx}',
],
NextJS
I was able to bootstrap a NextJS project no problem, so it seems like its an issue with Remix/Shadcn
Versions
Node 20.10.0 "@remix-run/dev": "^2.3.1", "@remix-run/eslint-config": "^2.3.1", "@types/react": "^18.2.20", "@types/react-dom": "^18.2.7", "autoprefixer": "^10.4.16", "eslint": "^8.38.0", "tailwindcss": "^3.3.6", "typescript": "^5.1.6" shadcn/ui 0.4.1
Operating system
Arch linux
thank youuuu! :smile:
I had a similar issue following the vite instructions - it created an '@' folder at the root. Using Windows during development.
This was messing me up big time - thanks for explaining the (temporary) fix @dan-cooke
(on Windows using indie-stack)
Guys, are you sure you put paths
inside compilerOptions
in tsconfig.json
?
If paths
sits outside, it does nothing.
Let me know how it goes. I had the same problem and this solved it.
This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.
Guys, are you sure you put
paths
insidecompilerOptions
intsconfig.json
?If
paths
sits outside, it does nothing.Let me know how it goes. I had the same problem and this solved it.
Yes because I did not configure paths - this is purely from setting up a fresh remix project and following integration for Shadcn