迁移到 Vite:未捕获的类型错误:无法读取未定义的属性“attrs”

时间:2021-06-01 08:22:25

标签: javascript reactjs create-react-app vite

出于开发环境中的性能原因,我正在尝试将大型应用从 create-react-app 迁移到 Vite.js。

我遵循了本指南:https://phelipetls.github.io/posts/migrating-from-cra-to-vite/

这是详细的错误:

Uncaught TypeError: Cannot read property 'attrs' of undefined
    at node_modules/styled-bootstrap-grid/dist/components/Container/Container.js (Container.js:68)
    at __require2 (chunk-VZ7BJMYF.js?v=f5540ad4:17)
    at node_modules/styled-bootstrap-grid/dist/components/Container/index.js (index.js:27)
    at __require2 (chunk-VZ7BJMYF.js?v=f5540ad4:17)
    at node_modules/styled-bootstrap-grid/dist/index.js (index.js:53)
    at __require2 (chunk-VZ7BJMYF.js?v=f5540ad4:17)
    at dep:styled-bootstrap-grid:1
node_modules/styled-bootstrap-grid/dist/components/Container/Container.js @ Container.js:68
__require2 @ chunk-VZ7BJMYF.js?v=f5540ad4:17
node_modules/styled-bootstrap-grid/dist/components/Container/index.js @ index.js:27
__require2 @ chunk-VZ7BJMYF.js?v=f5540ad4:17
node_modules/styled-bootstrap-grid/dist/index.js @ index.js:53
__require2 @ chunk-VZ7BJMYF.js?v=f5540ad4:17
(anonymous) @ dep:styled-bootstrap-grid:1
injector.js:239 

我该如何调试?有什么提示吗?

提前致谢!

M

0 个答案:

没有答案