vueComponent / pro-components

easy use `Ant Design Vue` layout
MIT License
535 stars 214 forks source link

[BUG] 无法适配vite3.0 #240

Closed LiXunGuan closed 2 years ago

LiXunGuan commented 2 years ago

文件package.json内容:

{
    "private": true,
    "scripts": {
        "dev": "vite",
        "build": "vite build"
    },
    "devDependencies": {
        "@vitejs/plugin-vue": "^2.3.3",
        "axios": "^0.27",
        "laravel-vite-plugin": "^0.5.0",
        "lodash": "^4.17.19",
        "normalize.css": "^8.0.1",
        "postcss": "^8.1.14",
        "vite": "^3.0.0",
        "vue": "^3.2.37"
    },
    "dependencies": {
        "@ant-design-vue/pro-layout": "^3.0.0",
        "@ant-design/icons-vue": "^6.1.0",
        "ant-design-vue": "^3.2.10",
        "nprogress": "^0.2.0",
        "vue-router": "^4.1.2",
        "vuex": "^4.0.2"
    }
}

执行npm install无法安装,报错内容如下:

npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @vitejs/plugin-vue@2.3.3
npm ERR! Found: vite@3.0.3
npm ERR! node_modules/vite
npm ERR!   dev vite@"^3.0.0" from the root project
npm ERR!   peer vite@"^3.0.0" from laravel-vite-plugin@0.5.2
npm ERR!   node_modules/laravel-vite-plugin
npm ERR!     dev laravel-vite-plugin@"^0.5.0" from the root project
npm ERR!   1 more (vite-plugin-full-reload)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vite@"^2.5.10" from @vitejs/plugin-vue@2.3.3
npm ERR! node_modules/@vitejs/plugin-vue
npm ERR!   dev @vitejs/plugin-vue@"^2.3.3" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: vite@2.9.14
npm ERR! node_modules/vite
npm ERR!   peer vite@"^2.5.10" from @vitejs/plugin-vue@2.3.3
npm ERR!   node_modules/@vitejs/plugin-vue
npm ERR!     dev @vitejs/plugin-vue@"^2.3.3" 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 C:\Users\lee\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\lee\AppData\Local\npm-cache\_logs\2022-07-30T17_49_47_950Z-debug-0.log
LiXunGuan commented 2 years ago

@vitejs/plugin-vue依赖升级到3.0解决