js-webflow-api icon indicating copy to clipboard operation
js-webflow-api copied to clipboard

Wrong node-fetch import in Fetcher

Open jakubchadim opened this issue 1 year ago • 1 comments

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 avatar Apr 17 '24 21:04 jakubchadim

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

jakubchadim avatar Apr 17 '24 21:04 jakubchadim

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.

zplata avatar May 28 '24 22:05 zplata

Hey @jakubchadim - this should be addressed in v2.3.5, mind trying it out when you get a chance?

zplata avatar Jul 16 '24 18:07 zplata

Closing, but feel free to re-open if you're still having issues after upgrading to the latest SDK version above!

zplata avatar Jul 23 '24 17:07 zplata