Closed MiDark closed 1 year ago
axios有相关的issue:https://github.com/axios/axios/issues/5298
axios在最近更新到了1.2.0版本(https://www.npmjs.com/package/axios?activeTab=versions) 在@larksuiteoapi/node-sdk的package.json中配置"axios": ">=0.27.0", 新部署的@larksuiteoapi/node-sdk环境,自动安装1.2.0版本的axios后,调用接口会返回乱码数据,测试代码:
const lark = require("@larksuiteoapi/node-sdk"); const client = new lark.Client({ appId: "********", appSecret: "********", }); client.im.chat.list({ params: { page_size: 20, }, }) .then((res) => { console.log(res); });
手动替换node_modules中的axios版本为1.1.3可恢复正常:
我把包先锁到>=0.27.0 <1.0.0,等axios官方fix相关issue,sdk升级到1.7.1可用
axios在最近更新到了1.2.0版本(https://www.npmjs.com/package/axios?activeTab=versions) 在@larksuiteoapi/node-sdk的package.json中配置"axios": ">=0.27.0", 新部署的@larksuiteoapi/node-sdk环境,自动安装1.2.0版本的axios后,调用接口会返回乱码数据,测试代码:
手动替换node_modules中的axios版本为1.1.3可恢复正常:![image](https://user-images.githubusercontent.com/8789351/203679782-760f02f6-e77c-478a-bfb8-50688e33aa56.png)