Victor
Victor

Reputation: 5353

Create-nuxt-app creates nuxt with 2.0.0 even if it's 2.8.0

I have an issue with installing nuxt.

The thing is,yarn global list shows

info "[email protected]" has binaries:
      - create-nuxt-app

After running yarn create nuxt-app I check my package.json which shows "nuxt": "^2.0.0"

Why so? I checked that the latest nuxt version is 2.8.1, shouldn't it be 2.8.1 in package.json?

Upvotes: 0

Views: 712

Answers (1)

Alex
Alex

Reputation: 56

There are two different packages at play here. First we have create-nuxt-app, which scaffolds your project and is at version 2.8.0.

That scaffold contains the package.json template, which is used to generate the package.json of your project. It contains "nuxt": "^2.0.0", where the ^ means: "Get me the latest minor version (and patch version) of nuxt 2", which as time of writing is 2.8.1. See also What's the difference between tilde(~) and caret(^) in package.json?

In conclusion, there is no need to update that template file everytime a new nuxt version is released, you'll always get the latest 2.x.x version of nuxt.

Upvotes: 1

Related Questions