I'm building a little function that sends mails through Google Cloud Functions.
For templating i'm using Marko.js.
When i do a require to a folder, returns a strange require with some numbers on path that doesnt exist on my local development.
Fixed guys, the error is not that the path is not found, is EROFS (read-file system)
MarkoJS generates .js files dynamically, the cloud functions are read-file system server, so we have two options here:
require('marko/compiler').defaultOptions.writeToDisk = false;
/tmp
folder, is the only dir allowed to write from cloud functions