求助微信小程序真机预览报错

使用npm install socket.io-client,微信小程序模拟器运行没有错误。
真机预览报错 找不到 self,卸载掉socket.io 就不报错了