Open piousdev opened 4 months ago
hey @piousdev đ
I tried to reproduce this but this is not a bug, according to your command npx create-next-app@latest --typescript my-app && cd my-app
instead of this you can used npx create-next-app@latest my-app --typescript
cd my-app
I had this issue as well, ended up being specific to using Node version 20.6.0. When I bumped my project to latest it worked as expected
Describe the bug
TypeError: Cannot redefine property: File
Description
I encountered a
TypeError: Cannot redefine property: File
when trying to initializeshadcn-ui
in my Next.js project. This issue occurs despite not using Babel directly in my project. Below are the details of the environment and steps to reproduce the issue.I have cleared the npm cache, deleted node_modules, completely deleted Node.js and all it traces and reinstalling it again. This issue does not occur when Babel is explicitly added to the project. This issue persists across different Node.js versions and across different projects.
I try isolating it by starting out a new test-project and still the same issue.
Affected component/components
All. Can't initialize shadcn.
How to reproduce
Create a new Next.js project:
npx create-next-app@latest --typescript my-app && cd my-app
Initialize shadcn-ui:
npx shadcn-ui@latest init
Codesandbox/StackBlitz link
No response
Logs
System Info
Before submitting