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

Error, fetch is not defined. #15

Closed
Nessie-Dev opened this issue Mar 13, 2023 · 8 comments
Closed

Error, fetch is not defined. #15

Nessie-Dev opened this issue Mar 13, 2023 · 8 comments

Comments

@Nessie-Dev
Copy link

is says fetch is not defined. I'm using node js 16, please help me how can i fix this?

@realcoloride
Copy link
Owner

realcoloride commented Mar 13, 2023 via email

@Naozumi520
Copy link

Naozumi520 commented Mar 13, 2023

I'm using node 18.14.2 and getting the same problem. I'm hosting on heroku.

Screenshot 2023-03-13 at 8 20 03 PM

@realcoloride
Copy link
Owner

realcoloride commented Mar 13, 2023 via email

@Naozumi520
Copy link

Naozumi520 commented Mar 13, 2023

Thank you for your reply. Global fetch did the trick, but I got an new issue:
Error: Failed to fetch a lazy token

Update: Got the error Token is invalid if using personal token

@Nessie-Dev
Copy link
Author

No bro using node js version 18 will affect my all scripts plugins. Please any other way to fix this?

@realcoloride
Copy link
Owner

No bro using node js version 18 will affect my all scripts plugins. Please any other way to fix this?

I could try pushing an experimental update that requires node-fetch in the dependencies when done fixing #13 & #14 - Currently solving multiple problems, so it would be better if I pushed one common update.

I will keep you updated, in the meantime, either upgrade to node >18 (19 is preferred) or wait for a new update.

Sorry for the inconvenience!

@realcoloride
Copy link
Owner

Update 1 - Related to issue #11, quote:

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.

image

After checking, node-fetch is already required in the dependencies. (in 1.0.0 at least)

@realcoloride
Copy link
Owner

Merging all updates for 1.1.1 in a new issue: #17.
Thank you for your understanding and patience.

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

No branches or pull requests

3 participants