微信小程序|log writeFile err writeFile:fail the maximum size of the file storage limit is exceeded
微信小程序|解决 “log writeFile err writeFile:fail the maximum size of the file storage limit is exceeded” 的方法
·
问题原因
log writeFile err writeFile:fail the maximum size of the file storage limit is exceeded
微信小程序控制台输出的信息(console.log)会写入到一个文件中。如果控制台打印的东西积累的太多了,就会超出这个文件的大小限制。
解决方法
- 点击微信开发者工具 -> 详情 -> 基本信息 -> 文件系统 -> 进入该文件夹
- 在名字是小程序appID那个文件夹下,按照 /usr/miniprogramLog/ 路径进入,删除日志文件
- 删除代码中相应的console.log()
反思
对我而言,我是使用了 Taro + React 作为开发的框架。其中有一个页面组件中不同状态之间发生了循环依赖,导致组件无限渲染,因此会不断打印console.log(),很快就撑爆了这个存储日志的文件。。。。

更多推荐
所有评论(0)