I created the simplest app possible to test with only two files. An “index.html” file at the root folder containing a link pointing to the expected download file and a “cron.ts” file in the netlify/functions folder containing the code provided above.
However when dragging and dropping to manually deploy the assets, the log says “No functions deployed”. Am I missing a trick?
So I’ve added the dependencies to my package.json as below:
{
“name”: “cron_example”,
“version”: “1.0.0”,
“dependencies”: {
“@netlify/blobs”: “^9.1.2”,
“@netlify/functions”: “^3.1.9”
}
}
However, I now get a " require() of ES Module from …not supported.". Any ideas?
I’d recommend using some online resources to continue further as debugging your code is outside our scope of Support. Based on just the provided details, I have no idea what you’re trying to require, but I’d recommend adding "type": "module" to your package.json.
Sorry for the followup question but going back to my original question. Is it even possible to permanently write to the file system from a netlify function?