"Why isn't fetch in nodejs working like it does in the browser?"
hey guys, so i’m trying to use fetch in nodejs for a simple API call, but it’s acting weird??
in the browser, it works fine, but in node, i keep getting "fetch is not defined" errors. what gives?
i thought node had fetch now? or do i still need to install something?
also, if there’s a better way to do this natively, lmk. not sure if i should use axios or stick with fetch in nodejs.
thanks for any help!
---
*(or if you prefer a shorter version
*
"Fetch in nodejs keeps giving me errors—what am i missing?"
ugh, why is fetch in nodejs so finicky??
works in chrome, breaks in node. do i need a polyfill or something?
help a dev out pls 😅
hey guys, so i’m trying to use fetch in nodejs for a simple API call, but it’s acting weird??
in the browser, it works fine, but in node, i keep getting "fetch is not defined" errors. what gives?
i thought node had fetch now? or do i still need to install something?
also, if there’s a better way to do this natively, lmk. not sure if i should use axios or stick with fetch in nodejs.
thanks for any help!
---
*(or if you prefer a shorter version
* "Fetch in nodejs keeps giving me errors—what am i missing?"
ugh, why is fetch in nodejs so finicky??
works in chrome, breaks in node. do i need a polyfill or something?
help a dev out pls 😅
