Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace isomorphic fetch with cross fetch #5

Merged
merged 1 commit into from
May 28, 2024

Conversation

connorlindsey
Copy link
Contributor

There's a several year old bug in isomorphic-fetch that makes it incompatible with server actions and likely some other newer JS environments: matthew-andrews/isomorphic-fetch#194.

This PR replaces isomorphic fetch with cross fetch which works.

Tested against a Next app with the following versions by calling the Bento Node SDK in a server action:

"next": "14.2.3",
"react": "^18",
"react-dom": "^18"

Resolves: #4

@@ -1,5 +1,5 @@
{
"version": "0.2.00",
"version": "0.2.1",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: already bumped the version number

@jessehanley jessehanley merged commit 975b735 into bentonow:main May 28, 2024
@connorlindsey connorlindsey deleted the replace-iso-fetch branch May 28, 2024 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error with bento.V1.track: realFetch.call is not a function
2 participants