问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/55691937/why-does-create-nuxt-app-installs-nuxt-version-1-4-5