Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hi, I’m trying to follow the tutorial:
https://docs.digitalocean.com/tutorials/jamstack-series/
Everything seemed to move along just fine, until I test the cloud/getCoffee function. When I do that, I get the above error.
I have to add though, I don’t get it 100% of the time. For a while, it appeared that if I modify (like adding/removing a blank line) & save the function form the Digital Ocean page, it would work, but as soon as I deploy it from doctl, I’d get the error again. That was a couple hours ago. Now that I’m back at it, I can’t get it working properly at all. I suspect if I keep goofing with it though, I may get some intermittent success. I haven’t nailed down the specifics to reliably reproduce the problem.
I have a scripting background, some minor web app development, but no experience with NodeJS/Mongo/Cloud. That’s why I’m messing with the tutorial.
Any ideas?
Thank you
Activation Id: 32a38503a25641e6a38503a25651e600
2022-09-18T17:48:44.171377073Z stdout: ReferenceError: require is not defined in ES module scope, you can use import instead
2022-09-18T17:48:44.171455712Z stdout: at file:///tmp/index.mjs:2:21
2022-09-18T17:48:44.171463273Z stdout: at ModuleJob.run (internal/modules/esm/module_job.js:183:25)
2022-09-18T17:48:44.171467211Z stdout: at async Loader.import (internal/modules/esm/loader.js:178:24)
2022-09-18T17:48:44.171470901Z stdout: at async actionLoop (/nodejsAction/prelauncher.js:68:20)
2022-09-18T17:48:44.174519Z stderr: The action did not initialize or run as expected. Log data might be missing.
Rory McEwan
Anjanesh Lekshminarayanan
182d09356ab94d3893ddfaca4f0270
Prashant Kumbhat
kprichard
e452769e8f30404d81a3bc803143f4
robert
Eleanor
GamesmenJordan