Netlify JS OpenAPI throws: "The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received undefined" #5591
Labels
type: bug
code to address defects in shipped code
Describe the bug
I've set up a fairly simple hook to delete form submissions after they have been forwarded via mail (based on this guide).
It was working well for the last years, but now I noticed that the submissions are not deleted anymore.
I found the following error message in the function logs:
It seems like the import is somehow broken, probably because this
createRequire()
call fails.I was also able to reproduce this problem locally when I executed the function manually using
npx netlify functions:invoke submission-created
.The messages still goes through tho, it's just the cleanup hook that fails.
This issue was reported twice already, one time in the old repo and the new monorepo, but both are stale/ closed.
Maybe this time we can finally get a resolution.
I am on the latest version "13.1.14" of the Netlify package.
Steps to reproduce
functions/submission-created.js
npx netlify functions:invoke submission-created
Configuration
Deploy logs
The issue doesn't occur while deploying, but during runtime.
For runtime function logs, see above.
The text was updated successfully, but these errors were encountered: