微信小程序[渲染层错误] TypeError: Cannot read property ‘replace‘ of undefined 【解决办法】

微信小程序报错:

[渲染层错误] TypeError: Cannot read property 'replace' of undefined
    at rewritor (http://127.0.0.1:15386/__pageframe__/__extendedlib__/weui/latest/pageframe.js:176:44)
    at http://127.0.0.1:15386/__pageframe__/__extendedlib__/weui/latest/pageframe.js:194:127
[渲染层错误] webviewScriptError
Cannot read property 'replace' of undefined
TypeError: Cannot read property 'replace' of undefined
    at rewritor (http://127.0.0.1:15386/__pageframe__/__extendedlib__/weui/latest/pageframe.js:176:44)
    at http://127.0.0.1:15386/__pageframe__/__extendedlib__/weui/latest/pageframe.js:194:127
[渲染层错误] Uncaught TypeError: Cannot read property 'replace' of undefined
[渲染层错误] TypeError: Cannot read property 'replace' of undefined
    at rewritor (http://127.0.0.1:15386/__pageframe__/__extendedlib__/weui/latest/pageframe.js:176:44)
    at http://127.0.0.1:15386/__pageframe__/__extendedlib__/weui/latest/pageframe.js:194:127
[渲染层错误] webviewScriptError
Cannot read property 'replace' of undefined
TypeError: Cannot read property 'replace' of undefined
    at rewritor (http://127.0.0.1:15386/__pageframe__/__extendedlib__/weui/latest/pageframe.js:176:44)
    at http://127.0.0.1:15386/__pageframe__/__extendedlib__/weui/latest/pageframe.js:194:127
[渲染层错误] Uncaught TypeError: Cannot read property 'replace' of undefined

微信小程序[渲染层错误] TypeError: Cannot read property ‘replace‘ of undefined 【解决办法】_第1张图片
情况:

在测试版开发,开发完成之后切换到生产环境,再次编译运行,就报了这个错,开发的时候都好好的,切换到的正式小程序账号就报错了 … 很无奈啊

再次切换至测试号(开发环境),这儿错误也不消失 …

预览、真机预览、上传到体验版用手机扫,都没问题,就是开发者工具报错

把后开发的代码开个分支记录,回退一下代码版本、清缓存,删小程序记录,卸载开发者工具重装,没用,都没用,统统都没用,这个错误就是突然间出现的 …

今天早上突然间想到的还有一种没测试:修改基础库版本

好嘛,把基础库版本从 2.8.3 调整为 2.12.2 ,哎?好了,我的天啊,简直愁死我了,升一下基础库版本就好了,服,记录一下

微信小程序[渲染层错误] TypeError: Cannot read property ‘replace‘ of undefined 【解决办法】_第2张图片
微信小程序[渲染层错误] TypeError: Cannot read property ‘replace‘ of undefined 【解决办法】_第3张图片
不报错了 哇嘎嘎

你可能感兴趣的:(微信小程序,小程序)