Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nuxt 3 files not visible in the directory structure

I recently started learning NuxtJs and create a nuxt app using the nuxt3 template. The code i used to generate the starter project is

npx nuxi init nuxt-app

However the the terminal shows that the app has been created and the dev server also starts displaying the Nuxt3 welcome page. But when i load the directory in vs code the folders like pages,store and components are not visible as seen in the screenshot below .

enter image description here

like image 595
Deejay Super Avatar asked Dec 05 '25 14:12

Deejay Super


1 Answers

You are importing <NuxtWelcome /> component from node_modules folder. Delete it and replace with <NuxtPages/>. Create your own components in folder pages. Nuxt 3 imports components by itself, so you don't see them in <script> tag. <NuxtPages /> will do the magic with components in page folder. For example, Index.vue component you will see in / home page and About.vue in /about.

like image 181
Mises Avatar answered Dec 07 '25 23:12

Mises