简体   繁体   English

未捕获的类型错误:Object 原型可能只是 Object 或 null:未定义

[英]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.

相关问题 未捕获的TypeError:Symfony 2中的ExtJS对象原型只能是Object或为null - Uncaught TypeError: Object prototype may only be an Object or null with ExtJS in Symfony 2 TypeError: Object prototype may only be an Object or null: undefined - TypeError: Object prototype may only be an Object or null: undefined Extjs Sencha编译的应用程序引发Uncaught TypeError:对象原型只能是Object或null - Extjs sencha compiled app throws Uncaught TypeError: Object prototype may only be an Object or null 未捕获的TypeError:对象原型可能只是一个Object,或者在ember-1.0.0-pre.2上为null - Uncaught TypeError: Object prototype may only be an Object or null on ember-1.0.0-pre.2 未捕获的TypeError:对象原型可能只是一个Object,或者在ember.js上为null - Uncaught TypeError: Object prototype may only be an Object or null on ember.js 带Typescript抛出TypeError的React Relay(react-relay):对象原型只能是一个Object或为null:未定义 - React Relay (react-relay) with Typescript throwing TypeError: Object prototype may only be an Object or null: undefined TypeScript错误对象原型只能是一个对象或null:未定义 - TypeScript Error Object prototype may only be an Object or null: undefined 运行dyson模拟服务器(使用express.js)的异常“ TypeError:对象原型只能是对象或为空” - Exception 'TypeError: Object prototype may only be an Object or null' running dyson mock server (using express.js) 库和 nodejs 库代码中的循环依赖 (?) - 对象原型可能只是一个对象或 null:未定义 - Circular dependency (?) in library & nodejs library code - Object prototype may only be an Object or null: undefined 未捕获的TypeError:无法将未定义或null转换为对象 - Uncaught TypeError: Cannot convert undefined or null to object
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM