2024年的VUE2下的无效指令npm install --save vue-i18n

vue官网已经声明了不再维护vue2, vue-i18n安装依赖的时候就只接安装vue3的vue-i18, 直接报错:

> npm install --save vue-i18n


npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/vue
npm ERR!   vue@"2.6.12" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue@"^3.0.0" from [email protected]

vue2框架下安装国际化i18n,最好安装早期的版本。比如:

>npm i [email protected] --save

你可能感兴趣的:(编程羔手之羔才生,npm,vue.js,前端,前端国际化)