I followed this example to create a nodejs function but I got the following error:
Error: api/index.mjs: config.runtime: "nodejs" semantics will evolve soon. Please remove the runtime key to keep the existing behavior.
I also tried this example, I got the same error.
Removing the runtime key result in FUNCTION_INVOCATION_FAILED.
I also followed this example but same error.
The following code was working up until 13 days ago
import Pusher from "pusher";
const pusher = new Pusher({
secret: process.env.PUSHER_SECRET,
appId: process.env.PUSHER_APP_ID,
key: process.env.PUSHER_KEY,
cluster: ap2,
useTLS: true,
});
export default (req, res) => {
pusher.trigger(pie-bot, req.body.pie, req.body);
setTimeout(_ => res.end(), 1000);
}