很久没有打开的项目,最近打开,模拟器中能正常显示,但是在手机(iOS和安装)上体验就报错。
报错信息如下:
SystemError (jsEnginScriptError)
Object.defineProperty called on non-object
TypeError: Object.defineProperty called on non-object
at r.defineProperty (<anonymous>)
at nf_init_Boolean (app-service.js:848:8)
at nf_init (app-service.js:776:70)
at $gwx (app-service.js:953:1)
at Co (WASubContext.js:1:364874)
at So.create (WASubContext.js:1:366292)
at y.prepare (WASubContext.js:1:252659)
at y._advancedCreate (WASubContext.js:1:253600)
at y.createWithGenerics (WASubContext.js:1:257321)
at qi (WASubContext.js:1:413261)
还有这样的报错:
SystemError (jsEnginScriptError)
null is not an object (evaluating 'c.template.createInstance')
TypeError: null is not an object (evaluating 'c.template.createInstance')
at (WASubContext.js:1:240691)
at (WASubContext.js:1:242940)
at Zi (WASubContext.js:1:399224)
at us (WASubContext.js:1:407210)
at create (WASubContext.js:1:446287)
at (WASubContext.js:1:457645)
at (WASubContext.js:1:423694)
at (WASubContext.js:1:461549)
at (WASubContext.js:1:423694)
at (WASubContext.js:1:464638)
at (WASubContext.js:1:423694)
at or (WASubContext.js:1:465334)
at (WASubContext.js:1:422798)
at (WAServiceMainContext.js:1:410592)
at emit (WAServiceMainContext.js:1:415736)
at emit (native code)
at (WAServiceMainContext.js:1:1527193)
at (WAServiceMainContext.js:1:1095781)
at (WAServiceMainContext.js:1:410691)
at emit (WAServiceMainContext.js:1:415736)
at (WAServiceMainContext.js:1:416783)
at (WAServiceMainContext.js:1:407063)
at emit (WAServiceMainContext.js:1:117221)
at emit (native code)
at emit (WAServiceMainContext.js:1:116840)
at subscribeHandler (WAServiceMainContext.js:1:120326)
你好,更新下工具版本呢?
我自己来回答这个问题吧!
最终的解决方案是在app.json文件中,添加"lazyCodeLoading": "requiredComponents"。