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] - pnpm - VSCode's Intellisense doesn't work for all props #3025

Closed
vietan0 opened this issue May 19, 2024 · 7 comments
Closed

[BUG] - pnpm - VSCode's Intellisense doesn't work for all props #3025

vietan0 opened this issue May 19, 2024 · 7 comments

Comments

@vietan0
Copy link

vietan0 commented May 19, 2024

NextUI Version

2.3.6

VSCode Version

1.89.1

Describe the bug

IntelliSense displays some props and not others.

There's no color prop here:

<Button /> <Input />
image image

In <Button />, props like color, onPress, variant, radius don't show up, while props like isLoading, spinner, disableRipple do.

In other components e.g. <Card />, no props show up.
image

Your Example Website or App

https://stackblitz.com/edit/vitejs-vite-vz9tyq?file=src%2FReproIssue.tsx

Steps to Reproduce the Bug or Issue

  1. Go to Stackblitz repo
  2. Go to any component's opening tag and open Intellisense by Ctrl + Space

Expected behavior

Full list of props to show up.

Screenshots or Videos

2024-05-19-13-42-44.mp4

Operating System Version

Windows

Copy link

linear bot commented May 19, 2024

@wingkwong
Copy link
Member

image

@vietan0
Copy link
Author

vietan0 commented May 20, 2024

@wingkwong I have another bug-free nextui project, so I tracked down its type definitions and found out the types I'm missing come from @nextui-org/theme, which reference tailwind_variants.

image

But tailwind-variants was not installed in @nextui-org/theme:

Expected Actual
image image

I tried installing tailwind-variants in the root of my project and that didn't work. What should I do to fix this?

@wingkwong
Copy link
Member

can you share your package.json and the way you install?

@vietan0
Copy link
Author

vietan0 commented May 20, 2024

https://github.com/vietan0/todo-fe/blob/main/package.json

What do you mean by 'the way I install'? I use global installation if that's what you're asking.

@wingkwong
Copy link
Member

wingkwong commented May 20, 2024

like are you using pnpm or npm or other package managers. if it is pnpm, make sure you've done this step: https://nextui.org/docs/guide/installation#setup-pnpm-optional

@vietan0
Copy link
Author

vietan0 commented May 20, 2024

I found out that "preserveSymlinks": true in tsconfig.json was the culprit. I turned it on a few commits before to fix this issue: pnpm/pnpm#3671, since I turned it off it's been working normally again.

@vietan0 vietan0 closed this as completed May 20, 2024
@vietan0 vietan0 changed the title [BUG] - VSCode's Intellisense doesn't work for all props [BUG] - pnpm - VSCode's Intellisense doesn't work for all props May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants