我得到了一个冲突的对等依赖关系:eslint-plugin-vue@7.20.0当尝试使用Heroku:构建/部署Vue CLI应用程序时
npm ERR! Could not resolve dependency:
npm ERR! peer eslint-plugin-vue@"^7.0.0" from @vue/eslint-config-standard@6.1.0
npm ERR! node_modules/@vue/eslint-config-standard
npm ERR! dev @vue/eslint-config-standard@"^6.1.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: eslint-plugin-vue@7.20.0
npm ERR! node_modules/eslint-plugin-vue
npm ERR! peer eslint-plugin-vue@"^7.0.0" from @vue/eslint-config-standard@6.1.0
npm ERR! node_modules/@vue/eslint-config-standard
npm ERR! dev @vue/eslint-config-standard@"^6.1.0" from the root project
我尝试运行npm install --legacy-peer-deps --save
,但这并没有解决问题。
在项目文件夹中,运行:
npm config set legacy-peer-deps=true --location=projectr
根据:https://github.com/npm/cli/issues/4664#issuecomment-1086096726
在出现类似错误后,我顺利安装了顺风。