TriPSs / nx-extend

Nx Workspaces builders and tools
MIT License
155 stars 40 forks source link

Shadcn fails to initialise #288

Closed BleedingDev closed 2 months ago

BleedingDev commented 2 months ago

I can't initialise Shadcn in my project. I have Nx v19.2.0 and installed all peer deps like class-variance-authority.

Package manager: Bun 1.1.14 Runtime: Bun / Node

  1. When I run nx g @nx-extend/shadcn-ui:init --verbose I get the error:
    
    NX   Cannot read properties of undefined (reading 'class-variance-authority')

TypeError: Cannot read properties of undefined (reading 'class-variance-authority') at D:\Side\nmit-coursition\node_modules\@nx-extend\shadcn-ui\src\generators\init\init.impl.js:80:71 at Generator.next () at fulfilled (D:\Side\nmit-coursition\node_modules\@nx-extend\shadcn-ui\node_modules\tslib\tslib.js:166:62) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)


2. When I run `bunx --bun nx g @nx-extend/shadcn-ui:init --verbose` I get the error:
```bash
 NX   undefined is not an object (evaluating 'package_json_1.devDependencies["class-variance-authority"]')

TypeError: undefined is not an object (evaluating 'package_json_1.devDependencies["class-variance-authority"]')
    at <anonymous> (D:\Side\nmit-coursition\node_modules\@nx-extend\shadcn-ui\src\generators\init\init.impl.js:80:56)
    at fulfilled (D:\Side\nmit-coursition\node_modules\@nx-extend\shadcn-ui\node_modules\tslib\tslib.js:166:62)
    at processTicksAndRejections (:12:39)
TriPSs commented 2 months ago

Wat version of the package are you using?

BleedingDev commented 2 months ago

Oh my bad, I had v2.0.0 and now I am at v2.0.3 and it worked.