ReferenceError: fetch is not defined
I've clone the repo, and cd example directory(express),and install packages, and npm run dev, when I try to entry http://localhost:3699/ip, I got error:
ReferenceError: fetch is not defined
Try running it with Node >= 18. Global fetch was introduced in Node 18.
Try running it with Node >= 18. Global
fetchwas introduced in Node 18.I
I've updated Node to v18.6 but still get the error, maybe the example is just provide some idea about how to use the plugin , not runnable
I think they should be runnable but I can't run the express example either (getting a different error).
Have you tried the npm run dev-flag script? That seems like it's trying to address the lack of fetch. A workaround could also be to install node-fetch and import it in the example.
@kasbah what error did you get ? the express example works fine for me under node 18