[英]Uncaught TypeError: Object prototype may only be an Object or null: undefined
When I run my app in development everything is fine but we I build the project for production using "npm run build", I get this error:当我在开发中运行我的应用程序时,一切都很好,但是我们使用“npm run build”构建了生产项目,我收到了这个错误:
2.9b72e8af.chunk.js:sourcemap:1 Uncaught TypeError: Object prototype
may only be an Object or null: undefined
at setPrototypeOf (<anonymous>)
at t (2.9b72e8af.chunk.js:sourcemap:1)
at 2.9b72e8af.chunk.js:sourcemap:1
at 2.9b72e8af.chunk.js:sourcemap:1
at Object.<anonymous> (2.9b72e8af.chunk.js:sourcemap:1)
at l ((index):1)
at Object.<anonymous> (2.9b72e8af.chunk.js:sourcemap:1)
at l ((index):1)
at Object.<anonymous> (2.9b72e8af.chunk.js:sourcemap:1)
at l ((index):1)
First I got Heap error that I resolved it by adding:首先我得到了堆错误,我通过添加解决了它:
"start": "react-scripts --max_old_space_size=4096 start", "start": "react-scripts --max_old_space_size=4096 start",
"build": "react-scripts --max_old_space_size=4096 build", "build": "react-scripts --max_old_space_size=4096 build",
From this post:从这篇文章:
How to fix "FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory" error 如何修复“致命错误:堆限制附近的无效标记压缩分配失败 - JavaScript 堆内存不足”错误
I read few other posts that had the same issue like mine but none of them helped.我读了一些与我有同样问题的其他帖子,但没有一个有帮助。
Any advice is appreciated.任何建议表示赞赏。
Unfortunately it was because of the bug from the Dialog component of Syncfusion and they provided a patch for that.不幸的是,这是因为 Syncfusion 的 Dialog 组件的错误,他们为此提供了一个补丁。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.