I installed npm install -g @vue/cli
After installation, I create a project vue create hello-world
After creating the project, I run the following command: npm list vue Returns `-- vue@3.2.20. This indicates that the project is using vue.js version 3.2.20
But if you look in package.json, then the version of "vue" will be indicated there: "vue": "^3.0.0",
It confuses me. How to fix it?. It is not clear to me which version is being used in the project. If I go to vue ui, then version 3.2.20 will also be indicated there. But the package.json of the project shows version 3.0.0. How to fix it? Explain what's going on?
The caret (^) in your package.json indicates that Vue will be updated to all future minor versions without exceeding the major version (version 3 in your case).
The version you got through npm list vue
, 3.2.20 matches this rule 3.XX
For more info on carets(^) and tildes (~), check the following question: Difference between tilde and caret .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.