When functions are constructed sometimes a message appear with the error 141 on Logs. We found many recurrences about the issue, with the message: “Invalid function”. For example, the code below is a 141 error with the use of quotes.
The correct code works and has another quote, look below the difference :)
If you want to work with more files at your Cloud code, another type of error 141 is when you don't use the correct syntax to request the file inside your 'main.js', like the line below: