创建项目步骤
概览:
在安装 npm安装时会报错
npm err! code eresolve
npm err! eresolve could not resolve
npm err!
npm err! while resolving: @vue/eslint-config-standard@6.1.0
npm err! found: eslint-plugin-vue@8.7.1
npm err! node_modules/eslint-plugin-vue
npm err! dev eslint-plugin-vue@"^8.0.3" from the root project
npm err!
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 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.
依赖冲突原因:
@vue/eslint-config-standard@6.1.0
依赖于 eslint-plugin-vue
的 ^7.0.0 版本,但是项目中安装了更高版本的eslint-plugin-vue
解决方式:降级eslint-plugin-vue到@vue/eslint-config-standard支持的版本
npm install eslint-plugin-vue@^7.0.0
解决后:
再进行npm安装,就能成功
npm i --registry https://registry.npmmirror.com vant@latest-v2 -s
发表评论