mistval / node-fetch-cache

Node-fetch with built-in response caching.
MIT License
51 stars 8 forks source link

TypeError: formData.getBoundary is not a function #15

Closed GirkovArpa closed 2 years ago

GirkovArpa commented 2 years ago
file:///_/node_modules/node-fetch-cache/src/index.js:20
  const boundary = formData.getBoundary();
                            ^

TypeError: formData.getBoundary is not a function
    at getFormDataCacheKey (file:///_/node_modules/node-fetch-cache/src/index.js:20:29)
    at getBodyCacheKeyJson (file:///_/node_modules/node-fetch-cache/src/index.js:49:12)
    at getCacheKey (file:///_/node_modules/node-fetch-cache/src/index.js:84:27)
    at getResponse (file:///_/node_modules/node-fetch-cache/src/index.js:92:20)
    at fetchCache (file:///_/node_modules/node-fetch-cache/src/index.js:139:35)
    at async main (file:///_/index.js:19:33)
GirkovArpa commented 2 years ago

I was importing FormData from the package formdata-node.

Changing to form-data solved this.