1. TypeError: source.on is not a function
定位formData写法问题
GitHub相同问题讨论,戳这里!
2. AxiosError: read ECONNRESET
可能的错误:接口参数传递错误
headers: {
'Content-Type': 'multipart/form-data',
......
},
headers中指明请求时传参要求,整个参数是formData;(别错传为对象)
3.TypeError: The "path" argument must be of type string or an instance of Buffer or URL. Received an instance of File
请求参数为文件时犯的错误,使用fs文件系统模块进行操作时url参数问题(这个与接口问题无关嘞🤦)
目前就这些,浮于表层,接受指教。
1万+

被折叠的 条评论
为什么被折叠?



