当试图在我的服务器上使用files.upload API上传文件时,当我上传的文件被转换为多部分表单数据时,我会遇到以下错误:
TypeError: Cannot read property 'name' of undefined
at FormData._getContentDisposition (/app/node_modules/form-data/lib/form_data.js:226:40)
at FormData._multiPartHeader (/app/node_modules/form-data/lib/form_data.js:177:33)
at FormData.append (/app/node_modules/form-data/lib/form_data.js:70:21)
at flattened.reduce (/app/node_modules/@slack/client/dist/WebClient.js:459:26)
at Array.reduce (<anonymous>)
at WebClient.serializeApiCallOptions (/app/node_modules/@slack/client/dist/WebClient.js:438:30)
at WebClient.<anonymous> (/app/node_modules/@slack/client/dist/WebClient.js:342:38)
at Generator.next (<anonymous>)
at /app/node_modules/@slack/client/dist/WebClient.js:7:71
at new Promise (<anonymous>)它在本地工作,但是在我的服务器上,相同的代码给出了上面的响应。有人知道是什么导致的吗?
发布于 2018-06-29 13:59:09
如果使用WebClient初始化的令牌是undefined,则会发生这种看似无关的错误消息。
我提高了“史莱克”中的一个问题来跟踪这一点。
https://stackoverflow.com/questions/51085391
复制相似问题