Jonas
Jonas

Reputation: 7885

why does Create-Nuxt-App installs nuxt version 1.4.5?

I'm a little confused because on the official nuxt site it says the current nuxt version is 2.5.X but when I create a nuxt app with npx create-nuxt-app and check the package.json under dependencies it says nuxt: ^1.0.0. When I check the nuxt node_module in its package.json it says version: 1.4.5.

So why does npx create-nuxt-app installs an old nuxt version and not the newest? The nuxt version doesn't impact the vue version, right? It says it uses vue ^2.5.17 which is pretty up to date.

Upvotes: 6

Views: 1369

Answers (4)

1-try to update your Node.js (V16 Recommended)

2-To create Nuxt2 projects you should use code below inside your Terminal

npx create-nuxt-app <PROJECT-NAME>

Upvotes: 0

Yusuf Gokol
Yusuf Gokol

Reputation: 1

Nuxt 3 released with a new CLI tool (nicknamed Nuxi) to manage project, add components, etc. Nuxi runs on Nuxt 3 but Nuxt <=2 remains on the create-nuxt-app tool

Nuxt 2 and 3 has their own CLI and 2 different commands to init a new project:

npx create-nuxt-app is for Nuxt <=2,

npx nuxi init is for Nuxt 3

Documentation Here

Upvotes: 0

user14338698
user14338698

Reputation:

You can try npx create-nuxt-app@version

Upvotes: 0

TheAlexLichter
TheAlexLichter

Reputation: 7289

Make sure you don't have a version of create-nuxt-app installed locally or globally. otherwise npx might take that one.

The current version of create-nuxt-app adds nuxt: ^2.4.0 or similar, which matches all minor and patch versions that begin with 2, so the latest 2.x.y will be installed.

Upvotes: 3

Related Questions