require(“zlib”).deflateSync(“aaaaa”);
就这样一行代码,web上可以,wx小游戏(微信开发工具)里不能使用,会报错;
VM702:1 gameThirdScriptError
Cannot read property ‘call’ of undefined;at setTimeout callback function
TypeError: Cannot read property ‘call’ of undefined
at h.k (http://127.0.0.1:21924/game/src/project.js:2877:200)
at h (http://127.0.0.1:21924/game/src/project.js:2784:15)
at h.s (http://127.0.0.1:21924/game/src/project.js:3175:15)
at h.m (http://127.0.0.1:21924/game/src/project.js:592:101)
at new h (http://127.0.0.1:21924/game/src/project.js:563:19)
at Object.n.inflateSync (http://127.0.0.1:21924/game/src/project.js:659:26)
at t._loadOver (http://127.0.0.1:21924/game/src/project.js:5189:35)
at v. (http://127.0.0.1:21924/game/cocos/cocos2d-js-min.js:1:463839)
at http://127.0.0.1:21924/game/cocos/cocos2d-js-min.js:1:462065
at Function. (http://127.0.0.1:21924/game/cocos/cocos2d-js-min.js:1:630408)
跟踪了源代码发现
c = e("./internal/streams/stream") 这个c是undefined。
在web上,这个是有值的,但是看了文件目录,internal/streams/下并没有stream这个文件,很奇怪。
请问下这个是什么问题?

