I've created a simple FaaS in DigitalOcean but it fails on the very first line. I'm using the web interface to remove as many variables as possible.
NodeMailer = require('nodemailer');
// ReferenceError: require is not defined in ES module scope, you can use import instead
So I try this with the following result:
import NodeMailer from 'nodemailer';
// Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'nodemailer' imported from /tmp/index.mjs
What am I missing?