NodeJS 在Vue3 composition API中运行“npm install”失败

0aydgbwb  于 2023-05-22  发布在  Node.js
关注(0)|答案(1)|浏览(170)

我想在Vue 3项目中安装依赖项,但我得到一个错误

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: vuejs-v-3@0.1.30
npm ERR! Found: vue@3.2.31
npm ERR! node_modules/vue
npm ERR!   vue@"^3.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue@">= 2.5 < 3" from @vue/composition-api@1.4.9
npm ERR! node_modules/@vue/composition-api
npm ERR!   @vue/composition-api@"^1.4.9" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!

我尝试使用'npm i --force' comand,但它不工作...
我应该在Node版本,或NPM,或Vue中进行降级吗?
谢谢

gwbalxhn

gwbalxhn1#

尝试将vue版本升级到“vue”:“^3.3.0”对我很有效

相关问题