You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Solution:
Not using cross-fetch and let users polyfill via node-fetch/cross-fetch/isomorphic-fetch themselves. Obviously this will be super duper breaking. Not sure if there is any other way though.
The text was updated successfully, but these errors were encountered:
bkniffler
changed the title
Cloudflare workers issues with cross-fetch
Cloudflare workers issues with cross-fetch (xmlhttprequest is not defined)
Nov 23, 2021
This should be resolved now afaik. Custom fetch is not needed - the lib now uses the global fetch if available, and otherwise falls back to cross-fetch (previously it always uses cross-fetch, which caused issues).
This library uses cross-fetch, which makes running in Cloudflare workers impossible.
Reference:
https://community.cloudflare.com/t/xmlhttprequest-is-not-defined/133866/4
Solution:
Not using cross-fetch and let users polyfill via node-fetch/cross-fetch/isomorphic-fetch themselves. Obviously this will be super duper breaking. Not sure if there is any other way though.
The text was updated successfully, but these errors were encountered: