I ran the init command in the root directory of my Nuxt project and the component and utils folder were created in the folder one level above my project root directory.
I followed everything in the installation instruction, namely
Would you like to use TypeScript (recommended)? no / yes Which framework are you using? Nuxt Which style would you like to use? › Default Which color would you like to use as base color? › Slate Where is your tsconfig.json or jsconfig.json file? › ./tsconfig.json Where is your global CSS file? › › src/index.css Do you want to use CSS variables for colors? › no / yes Where is your tailwind.config.js located? › tailwind.config.js Configure the import alias for components: › @/components Configure the import alias for utils: › @/lib/utils Write configuration to components.json. Proceed? > Y/n
Let's say my project folder structure is as follows:
What I expected
projects
|── nuxt-shadcn-project
| |── components
| |── lib
| |── utils.ts
What it turns out to be
projects
|── nuxt-shadcn-project
|── components
|── lib
|── utils.ts
I have double checked everything and rerun the whole thing at least 5 times, including nuxt.config.ts
Reproduction
After running
npx shadcn-vue@latest init
Describe the bug
I ran the init command in the root directory of my Nuxt project and the component and utils folder were created in the folder one level above my project root directory.
I followed everything in the installation instruction, namely
Would you like to use TypeScript (recommended)? no / yes Which framework are you using? Nuxt Which style would you like to use? › Default Which color would you like to use as base color? › Slate Where is your tsconfig.json or jsconfig.json file? › ./tsconfig.json Where is your global CSS file? › › src/index.css Do you want to use CSS variables for colors? › no / yes Where is your tailwind.config.js located? › tailwind.config.js Configure the import alias for components: › @/components Configure the import alias for utils: › @/lib/utils Write configuration to components.json. Proceed? > Y/n
Let's say my project folder structure is as follows: What I expected projects |── nuxt-shadcn-project | |── components | |── lib | |── utils.ts
What it turns out to be projects |── nuxt-shadcn-project |── components |── lib |── utils.ts
I have double checked everything and rerun the whole thing at least 5 times, including nuxt.config.ts
System Info
Contributes