-
Notifications
You must be signed in to change notification settings - Fork 69
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
fetch is not defined #11
Comments
Hello |
I did that already. |
Looks like you didn't import the package in client.js |
I don't have to, it works without having to require anything Though you might wanna install cross fetch, in what environment and node version do you run? |
Okay, I see what's happening,I'm running v16.6.2 but in version 18.0.0 they apparently added fetch to the global scope Check it: I may have to upgrade then... but I can't at this time. Maybe you should make that clear or make it compatible with older versions. |
Hello
How should I? And thanks for confirming that it's because of node's version
Le mar. 28 févr. 2023 à 22:10, Jacyn ***@***.***> a écrit :
… Okay, I see what's happening,I'm running v16.6.2 but in version 18.0.0
they apparently added fetch to the global scope
Check it:
https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#fetch-experimental
I may have to upgrade then... but I can't at this time. Maybe you should
make that clear or make it compatible with older versions.
—
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZ4WO5PQA4K2L3DKBUVIUWLWZZSVNANCNFSM6AAAAAAVLBXZRQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I upgraded to v18 so for me it's not a problem anymore. But if you want to make it compatible with older versions, you could just use the node-fetch library instead. All you have to do is import it. |
I tried installing node-fetch manually but it didn't fix it.
The text was updated successfully, but these errors were encountered: