webflow / js-webflow-api

Node.js SDK for the Webflow Data API
https://www.npmjs.com/package/webflow-api
285 stars 92 forks source link

Wrong node-fetch import in Fetcher #140

Open jakubchadim opened 2 months ago

jakubchadim commented 2 months ago

My nextJS API is failing that import require("node-fetch") is not a function. It needs to be imported as require("node-fetch").default in Fetcher.

jakubchadim commented 2 months ago

One possible fix would be require("node-fetch")?.default ?? require("node-fetch")

zplata commented 1 month ago

Good catch @jakubchadim. I'm able to reproduce this; we've got it on our radar to bump some dependencies that should fix this issue for a future release of this SDK.