nuxt / create-nuxt-app

Create Nuxt.js App in seconds.
MIT License
3.48k stars 429 forks source link

Missing Folders? #821

Closed hecktarzuli closed 3 years ago

hecktarzuli commented 3 years ago

It looks like in a latest update, some folder files were removed so folders that would normally exist for people were removed. Example: assets, layouts. Was this on purpose? Some people are getting confused since docs, examples, etc.. all have these core folders in their examples.

https://github.com/nuxt/create-nuxt-app/pull/792/files

rifftrader commented 3 years ago

It is as per design. If you have a look at the ReadMe in the root of a new project, it does give a bit of an explanation (curiously, it does not mention the middleware folder but this also follows the same pattern).

Have a look at the recently closed issues and you'll see one that deals with this topic.

atinux commented 3 years ago

We decided to remove them for simplicity since most of the directories are not required by default. Everything is documented in the README :)

AllanOricil commented 3 years ago

@danielroe

could you guys add a flag on create-nuxt-app to let us create all these folders automatically as it was before? Like, npx create-nuxt-app APP_NAME -c|f|a. Add some flag name that would resamble/relate to "create a project with all folders"

Or

at least define a list of folders we want? Like, you can add a new prompt for npx create-nuxt-app APP_NAME

Define your folders: ( ) components ( ) assets ( ) store ( ) plugins ( ) layouts

It seems unnecessary but I was really used to see a project with all folders, and now I feel something is missing. I have to waste time to do it by hand every time I start a new project.

Isidorev215 commented 3 years ago

Mine does not work. I added layouts/default.vue. Nothing happens. I checked .nuxt/app.js and I found this: import _6f6c098b from '.\\layouts\\default.vue' instead of import _6f6c098b from '..\\layouts\\default.vue' ...

I am using "nuxt": "^2.15.7"

danielroe commented 3 years ago

@Isidorev215 I'll happily look into that if you open an issue on https://github.com/nuxt/nuxt.js/issues with a reproduction.

michael-scheurer commented 3 years ago

Mine does not work. I added layouts/default.vue. Nothing happens. I checked .nuxt/app.js and I found this: import _6f6c098b from '.\\layouts\\default.vue' instead of import _6f6c098b from '..\\layouts\\default.vue' ...

I am using "nuxt": "^2.15.7"

I've got the exact same error.

Isidorev215 commented 3 years ago

After creating a nuxt project, I created the layouts folder and defined a default.vue layout before you running npm run dev. This worked for me. I went further to create all the nuxt folders that I needed before running the first npm run dev just in case.

Atif-Bashir-1998 commented 3 years ago

Mine does not work. I added layouts/default.vue. Nothing happens. I checked .nuxt/app.js and I found this: import _6f6c098b from '.\\layouts\\default.vue' instead of import _6f6c098b from '..\\layouts\\default.vue' ... I am using "nuxt": "^2.15.7"

I've got the exact same error.

Stop the server and restart it

adnane-ka commented 2 years ago

I'm facing this issue too, it keeps confusing me since the manual creation of layouts folder changes nothing! solved! for everyone facing this issue, make sure to run your project after you create the layout in manually created layouts folder and reference it to the proper page. since editing .nuxt/layouts/default.vue won't be useful, it's basically a cached folder.

it should not really be edited!

michaelmiracle018 commented 2 years ago

I'm new to nuxt. Seems the tutorials I've seen uses these layout and asset folder. How do I adjust and which folder replaces the old folders removed.

michaelmiracle018 commented 2 years ago

or do i have to create my own?

danielroe commented 2 years ago

@michaelmiracle018 If you are referring to Nuxt 3, please create a discussion at https://github.com/nuxt/framework/discussions/new with some info about what you've tried. (Probably you just need to add <NuxtLayout> in your app.vue - see https://v3.nuxtjs.org/guide/directory-structure/layouts/#enabling-the-default-layout.)

cryptic-dev commented 2 years ago

Learned nuxt a month ago. I liked how scss is already included and all the folders are present, this change made things worse. I cant even get the layouts to work.