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

谁都会走 提交于 2019-12-12 16:28:10

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!