vue 项目开发过程
-
安装 ESlint + prettier
npm i eslint@7 prettier@2 -D必须指定版本, 8版本的eslint + 3版本的 prettier 无法格式化
npm i eslint-plugin-prettier@4 eslint-config-prettier prettier-eslint-cli -D
npm install babel-eslint eslint-plugin-vue @vue/cli-plugin-eslint -D
npm install eslint-plugin-jsx-a11y eslint-plugin-import eslint-config-airbnb -D
全部安装错误而当全部 一起 npm install 时,出现错误
``` J:\IDEA_Project_List\XiangMu\HG_BiYeXiangMu\page>npm i eslint prettier eslint-plugin-prettier eslint-config-prettier prettier-eslint-cli babel-eslint eslint-plugin-vue @vue/cli-plugin-eslint eslint-plugin-jsx-a11y eslint-plugin-import eslint-config-airbnb -D npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: page@0.1.0 npm ERR! Found: prettier@2.8.8 npm ERR! node_modules/prettier npm ERR! optional prettier@"^1.18.2 || ^2.0.0" from @vue/component-compiler-utils@3.3.0 npm ERR! node_modules/@vue/component-compiler-utils npm ERR! @vue/component-compiler-utils@"^3.1.0" from vue-loader@15.10.2 npm ERR! node_modules/@hap-toolkit/dsl-vue/node_modules/vue-loader npm ERR! vue-loader@"^15.6.4" from @hap-toolkit/dsl-vue@0.6.13 npm ERR! node_modules/@hap-toolkit/dsl-vue npm ERR! @hap-toolkit/dsl-vue@"0.6.13" from @dcloudio/uni-quickapp-native@2.0.2-3081220230817001 npm ERR! node_modules/@dcloudio/uni-quickapp-native npm ERR! @vue/component-compiler-utils@"^3.3.0" from @vue/cli-service@5.0.8 npm ERR! node_modules/@vue/cli-service npm ERR! peer @vue/cli-service@"^3.0.0 || ^4.0.0 || ^5.0.0-0" from @vue/cli-plugin-babel@5.0.8 npm ERR! node_modules/@vue/cli-plugin-babel npm ERR! dev @vue/cli-plugin-babel@"~5.0.0" from the root project npm ERR! 4 more (@vue/cli-plugin-router, @vue/cli-plugin-vuex, ...) npm ERR! 1 more (@vue/vue-loader-v15) npm ERR! dev prettier@"*" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! dev eslint-plugin-prettier@"*" from the root project npm ERR! npm ERR! Conflicting peer dependency: prettier@3.0.3 npm ERR! node_modules/prettier npm ERR! peer prettier@">=3.0.0" from eslint-plugin-prettier@5.0.0 npm ERR! node_modules/eslint-plugin-prettier npm ERR! dev eslint-plugin-prettier@"*" 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 ERR! See D:\KaiFa\Node\node_cache\eresolve-report.txt for a full report.npm ERR! A complete log of this run can be found in:
npm ERR! D:\KaiFa\Node\node_cache_logs\2023-09-23T12_49_48_028Z-debug-0.log</details> -
下载配置文件,解压并导入 项目



浙公网安备 33010602011771号