背景
- vite构建阶段react-virtualized报错
报错信息
js
✘ [ERROR] No matching export in "node_modules/_react-virtualized@9.22.5@react-virtualized/dist/es/WindowScroller/WindowScroller.js" for import "bpfrpt_proptype_WindowScroller"
node_modules/_react-virtualized@9.22.5@react-virtualized/dist/es/WindowScroller/utils/onScroll.js:74:9:
74 │ import { bpfrpt_proptype_WindowScroller } from "....
解决办法
-
找到对应引用注释
找到 node_modules/react-virtualized/dist/es/WindowScroller/utils/onScroll.js 这个文件,把下面这句话注释掉
74行 | import { bpfrpt_proptype_WindowScroller } from ".../WindowScroller.js";