Home > Software engineering >  changing vue version inside a project
changing vue version inside a project

Time:11-28

Hi I would like to change a projects version of Vue using npm. I tried :

npm install vue@latest --save
<iframe name="sif1" sandbox="allow-forms allow-modals allow-scripts" frameborder="0"></iframe>

But when I tried :

npm v vue
<iframe name="sif2" sandbox="allow-forms allow-modals allow-scripts" frameborder="0"></iframe>

I got the following :

vue@2.6.14 | MIT | deps: none | versions: 362
Reactive, component-oriented view layer for modern web interfaces.
https://github.com/vuejs/vue#readme

keywords: vue

dist
.tarball: https://registry.npmjs.org/vue/-/vue-2.6.14.tgz
.shasum: e51aa5250250d569a3fbad3a8a5a687d6036e235
.integrity: sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==
.unpackedSize: 3.0 MB

maintainers:
- posva <posva13@gmail.com>
- yyx990803 <yyx990803@gmail.com>

dist-tags:
beta: 3.2.0-beta.8
csp: 1.0.28-csp
latest: 2.6.14
next: 3.2.23

published 5 months ago by posva <posva13@gmail.com>
<iframe name="sif3" sandbox="allow-forms allow-modals allow-scripts" frameborder="0"></iframe>

Indicating that I still was on Vue 2.6.14. Does anyone know how to solve this problem. Thanks in advance.

CodePudding user response:

Well if you check the @latest tag on the versions tab on npm the latest version is really 2.6.14.

To use a Vue 3, you need to use a @next tag instead. But that version is not 100% compatible with 2.x so please check the migration guide before doing so (also lot of tooling is not compatible as well and because JS projects usually involve "a lot" of tooling, migration might be not that simple)

  • Related