1、问题场景:
npm install 报错,以为是npm问题,改成cnpm install,也还是报错,根据错误信息提示,推断是eslint版本不兼容。
报错提示:
peerDependencies WARNING eslint-plugin-vue@^5.2.3 requires a peer of eslint@^5.0.0 but eslint@6.8.0 was installed peerDependencies WARNING eslint-plugin-vue@5.2.3 › vue-eslint-parser@^5.0.0 requires a peer of eslint@^5.0.0 but eslint@6.8.0 was installed peerDependencies WARNING eslint-config-standard@^14.1.0 requires a peer of eslint-plugin-node@>=9.1.0 but eslint-plugin-node@8.0.1 was installed deprecate @vue/cli-plugin-babel@3.5.1 › @vue/babel-preset-app@3.12.1 › core-js@^2.6.5 core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3. deprecate @vue/cli-plugin-eslint@3.12.1 › eslint@4.19.1 › file-entry-cache@2.0.0 › flat-cache@1.3.4 › circular-json@^0.3.1 CircularJSON is in maintena nce only, flatted is its successor.
2、解决办法
安装固定版本npm i eslint@5.0.0