question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I’ve tried to implement @giphy/js-fetch-api in a Node script, but I’m getting errors regarding code that’s “browser only” (window, new Headers(), etc).

Is the library intended to be for client-side JS only? - or is there Node support planned?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
giannifcommented, Apr 13, 2020

@budde377 I left it up to you to add the polyfill for fetch. In my experience, this is customary for libraries with polyfills. In the codesandbox I listed above, I used isomorphic-fetch.

I think this approach is best, because I wouldn’t want to include a polyfill in the package that globally shims anything, it might override something in your application.

It also keeps the bundle size down

1reaction
giannifcommented, Apr 6, 2020

@devpascoe react-native support is on the wish list! but not exactly on our roadmap just yet, feel free to create an issue and we can hopefully get started on it

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node.js - endoflife.date
Release Released Active Support Se... 19 2 months and 1 week ago. (18 Oct 2022) Ends in 3 months. (01 Apr 2023) En... 18 (...
Read more >
Node.js
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. ... For information about supported releases, see the release schedule.
Read more >
Node.js Release Working Group - GitHub
There are three phases that a Node.js release can be in: 'Current', 'Active Long Term Support (LTS)', and 'Maintenance'. Odd-numbered release lines are ......
Read more >
Node.js ES2015/ES6, ES2016 and ES2017 support
Yes. Yes Yes. Yes Error. Error Error. Error Error. Error Error. Error function() function() function() function() function() function() function() function() function() function() function() function() function() function()...
Read more >
Supported Node versions - Node-RED
Supported Node versions. Node-RED currently recommends Node 16.x LTS. Version, Support Level, Notes. < 10.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found