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]: 2.1.7 breaks alias resolution #6048

Open
2 tasks done
franleplant opened this issue Dec 12, 2024 · 0 comments
Open
2 tasks done

[bug]: 2.1.7 breaks alias resolution #6048

franleplant opened this issue Dec 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@franleplant
Copy link

Describe the bug

npx shadcn@latest add sidebar doesn't work (points to 2.1.7)

npx [email protected] add sidebar works as expected.

Here are examples of my config

{
  ...
  "aliases": {
    "components": "@org/package1/components",
    "utils": "@org/package1/lib/utils",
    "ui": "@org/package1/components/ui",
    "lib": "@org/package1/lib",
    "hooks": "@org/package1/hooks"
  },
}
{
    "compilerOptions": {
        "paths": {
            "@org/package1/*": ["./src/*"],
        }
    },
    "include": ["src"],
    "references": []
  }

with 2.1.6 the components are created with these types of imports

import { cn } from "@org/package1/lib/utils"

with 2.1.7

import { cn } from "@org/lib/utils"

Affected component/components

all

How to reproduce

with the configs above you can

  1. run npx [email protected] add sidebar and see how importing utils resolves to
  2. run npx [email protected] add sidebar and see that's different

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

macos 15.1.1
Tmux
node 20

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues
@franleplant franleplant added the bug Something isn't working label Dec 12, 2024
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