[b]"Why isn't fetch in Node.js working like it does in the browser?"[/b] or [b]"What's the best way to use fetch i

16 Replies, 1355 Views

"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 versionSmile*

"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 😅

Messages In This Thread
[b]"Why isn't fetch in Node.js working like it does in the browser?"[/b] or [b]"What's the best way to use fetch i - by - 11-12-2024, 10:00 PM



Users browsing this thread: 1 Guest(s)