Some of the directories are missing when I'm trying to create a new Nuxt js project

Viewed 3926

I'm trying to start a new project in the Nuxt JS framework with

npx create-nuxt-app project-name

After completing the installation I realized some of the directories are missing. Missing directories are - layouts, middleware, plugins, and assets. At first, I thought I did something wrong then I tried second and third times and the result is the same. I searched their official documentation and GitHub issue about this problem but I didn't found anything.

  • npm : "6.14.12"
  • nuxt: "^2.15.3"
3 Answers

The latest version of Nuxt is more simple and do have less boilerplate, it follows a simpler tutorial design (to probably lose less users on the road).
You can still add those yourself and it'll work perfectly fine!

This is probably because of Nuxt3 approach and the will to make teach things in a more minimalistic way.

More info here: https://github.com/nuxt/create-nuxt-app/releases
An official answer from Atinux can also be found here: https://github.com/nuxt/create-nuxt-app/issues/821#issuecomment-877653294


Also, everything is still explained in the README.md, with various links to the official documentation.

enter image description here

You can fix non working layouts directory like so:

update your package.json file with "nuxt": "^2.15.8" See also: https://nuxtjs.org/docs/release-notes

and run npm install

and your layouts folder will work again.

had the same problem. the project nuxt version was 2.15.7. actually the layout page property does not recognize layouts directory and updating nuxt version to 2.15.8 solved it.

Related