vitejs / vite

Next generation frontend tooling. It's fast!
http://vitejs.dev
MIT License
66.85k stars 6k forks source link

The project reported an error when upgrading from Vite4.5.0 to Vite5.0.2 #15101

Closed C-Jeril closed 9 months ago

C-Jeril commented 9 months ago

Describe the bug

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './parseAst' is not defined by "exports" in D:\vite-project\nodemodules.pnpm\vite@5.0.2@types+node@18.15.11_less@4.2.0\node_modules\rollup\package.json imported from D:\vite-project\nodemodules.pnpm\vite@5.0.2@types+node@18.15.11_less@4.2.0\node_modules\vite\dist\node\cli.js

Reproduction

none

Steps to reproduce

No response

System Info

dependencies:
@arco-design/web-vue 2.53.2                  lodash 4.17.21                               typescript-eslint 0.0.1-alpha.0
@typescript-eslint/typescript-estree 6.12.0  mitt 3.0.0                                   vue 3.3.8
@vueuse/core 9.13.0                          node 21.1.0                                  vue-echarts 6.6.1
arco-design-pro-vue 2.7.2                    nprogress 0.2.0                              vue-i18n 9.7.0
axios 1.6.2                                  pinia 2.1.7                                  vue-router 4.2.5
dayjs 1.11.7                                 query-string 8.1.0
echarts 5.4.3                                sortablejs 1.15.0

devDependencies:
@arco-plugins/vite-vue 1.4.5             eslint-config-airbnb-base 15.0.0         stylelint-config-prettier 9.0.5
@commitlint/cli 17.5.1                   eslint-config-prettier 8.8.0             stylelint-config-rational-order 0.1.2
@commitlint/config-conventional 17.4.4   eslint-import-resolver-typescript 3.5.5  stylelint-config-recommended-vue 1.5.0
@types/lodash 4.14.192                   eslint-plugin-import 2.27.5              stylelint-config-standard 34.0.0
@types/mockjs 1.0.7                      eslint-plugin-prettier 5.0.1             stylelint-order 6.0.3
@types/nprogress 0.2.0                   eslint-plugin-vue 9.10.0                 typescript 5.3.2
@types/sortablejs 1.15.1                 husky 8.0.3                              unplugin-vue-components 0.24.1
@typescript-eslint/eslint-plugin 6.12.0  less 4.2.0                               vite 5.0.2
@typescript-eslint/parser 6.12.0         lint-staged 15.1.0                       vite-plugin-compression 0.5.1
@vitejs/plugin-vue 4.5.0                 mockjs 1.1.0                             vite-plugin-eslint 1.8.1
@vitejs/plugin-vue-jsx 3.1.0             postcss-html 1.5.0                       vite-plugin-imagemin 0.6.1
@vue/babel-plugin-jsx 1.1.1              prettier 3.1.0                           vite-svg-loader 5.1.0
consola 3.2.3                            rollup 2.79.1                            vue-tsc 1.2.0
cross-env 7.0.3                          rollup-plugin-visualizer 5.9.0
eslint 8.54.0                            stylelint 15.11.0

Used Package Manager

pnpm

Logs

No response

Validations

patak-dev commented 9 months ago

Please provide a minimal reproduction when opening issues.

Check https://vitejs.dev/guide/migration.html#rollup-4, where we added a comment about this:

If you are using TypeScript, make sure to set moduleResolution: 'bundler' (or node16/nodenext) as Rollup 4 requires it. Or you can set skipLibCheck: true instead.