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

fetch is not defined after deployment #38

Closed
MiracleUFO opened this issue Oct 26, 2023 · 2 comments
Closed

fetch is not defined after deployment #38

MiracleUFO opened this issue Oct 26, 2023 · 2 comments

Comments

@MiracleUFO
Copy link

MiracleUFO commented Oct 26, 2023

@AidanWelch This package works fine when I start my server in terminal, but as soon as I deploy to Render it says ERROR ReferenceError: fetch is not defined at Object.requestFunction (/opt/render/project/src/node_modules/google-translate-api-x/lib/defaults.cjs:9:36), seems it isn't truly cross-platform or is there something I could do different to get it to work in a pure Node environment?

All the help will be appreciated and the batching feature is truly an improvement on the vitalets package. Thank you! ✨

@AidanWelch
Copy link
Owner

AidanWelch commented Oct 26, 2023

Older versions of Node don't fully implement the current ES6 standard such as fetch. See the pinned issue #20 on using node-fetch.

Thank you!

@MiracleUFO
Copy link
Author

Older versions of Node don't fully implement the current ES6 standard such as fetch. See the pinned issue #20 on using node-fetch.

Thank you!

Thank you, this works!

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

2 participants