I'm trying to execute my first function in the Appwrite and I faces with this error.
I'm using NodeJS -18.0 and in my script I only have test print example.
Pls help me to figure out the problem
TL;DR
Developer encountered an "Error [ERR_REQUIRE_ESM]" when trying to run a function in their app using Node.js 18.0. Potential issue with ES Module in the main.js file. Solution: Convert the file to CommonJS by adding "type": "module" in the package.json or changing the file extension to .cjs.