The error message suggests that there is a conflict between the version of Vue installed in your project and the version of Vue required by Vuex.

To resolve this issue, you have a few options:

  1. Update Vue to the required version: If you are willing to upgrade Vue to version 3.0.2, you can run the following command to update Vue and Vuex:
npm install vue@^3.0.2 vuex@next --save
  1. Use --force flag: If you want to keep the current version of Vue and force the installation of Vuex, you can use the --force flag:
npm install vuex@next --save --force
  1. Use --legacy-peer-deps flag: If you are using npm version 7 or above, you can use the --legacy-peer-deps flag to allow the installation of incompatible peer dependencies:
npm install vuex@next --save --legacy-peer-deps

Choose the option that best fits your project requirements and run the corresponding command to resolve the issue

npm install vuexnext --savenpm WARN old lockfile npm WARN old lockfile The package-lockjson file was created with an old version of npmnpm WARN old lockfile so supplemental metadata must be fetched fr

原文地址: http://www.cveoy.top/t/topic/h7qX 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录