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 note a function #1

Closed
ash-hashtag opened this issue Aug 23, 2022 · 1 comment
Closed

fetch is note a function #1

ash-hashtag opened this issue Aug 23, 2022 · 1 comment

Comments

@ash-hashtag
Copy link

ash-hashtag commented Aug 23, 2022

*not
at postJSON (node_modules/@planetscale/database/dist/index.js:80:28)
at Connection.execute (node_modules/@planetscale/database/dist/index.js:48:29)

@fooforge
Copy link

Apologies for the slow response! Looks like you're on a node version < 18. From Node.js 18 on, the fetch function is in the global scope. Versions prior to 18 need to use another fetch implementation, like undici.

$ node --version
v18.7.0
$ node -e 'console.log(fetch)'
[AsyncFunction: fetch]

Closing this, but feel free to reopen if you do, in fact, see any issues with Node.js 18.

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