The version of vue.js used is unknown.
P粉308089080
P粉308089080 2024-02-26 17:32:27
0
1
269

I installed itnpm install -g @vue/cli

After installation, I create a projectvue create hello-world

After creating the project, I run the following command: npm list vue Returns `-- [email protected]. This indicates that the project is using vue.js version 3.2.20

But if you look at package.json, the version of "vue" will be indicated there: "vue": "^3.0.0",

This confuses me. How to fix it? It's not clear to me which version is used in this project. If I go to vue ui then version 3.2.20 is shown there as well. But the project's package.json shows the version is 3.0.0. How to fix it? Explain what's going on?

P粉308089080
P粉308089080

reply all(1)
P粉239164234

The caret (^) in

package.json means that Vue will be updated to all future minor versions, but not beyond the major version (version 3 in your case).

The version you get through npm list vue, 3.2.20 conforms to this rule 3.X.X

For more information about the caret (^) and tilde (~), check the following questions: Difference between tilde and caret. p>

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!