Discussions
AddOn Error Packaging Function
I am receiving the error 'Error Packaging Function. Please try again or contact support for assistance.' when I try to save a simple function within a custom add on. This problem has only recently occurred as I have been able to save functions in the past.
Would you know why this could be happening?
I'm getting hte same error today. Never had a problem with this code before - must be on their end....
Hi Bruno,
This error typically occurs when there's an issue with the function code or configuration that prevents it from being properly packaged for deployment. Here are a few common causes and solutions:
- Check that your function code is valid JavaScript/Node.js and uses supported syntax. The SDK requires Node.js 14.x or higher for Lambda functions.
- Ensure you're not using deprecated modules like 'request'. Instead, use modern HTTP request libraries such as 'axios' or Node's built-in 'https' module.
- Verify your function's response format includes the required 'eventResponse' property in the JSON output.
If you continue experiencing issues after checking these points, please share your function code (with any sensitive information removed) so we can help identify the specific cause.
Thanks,
Cody
Hi There,
I have tried with with just hello world addon as well. But I have got the same response and I am send below code you check it on our side as well.
'use strict';
exports.handler = (event, context, callback) => {
console.log('Received event:', JSON.stringify(event, null, 2));
var strJobUUID = event.eventArgs.jobUUID;
var strHTMLResponse = `
Hello World Lambda Event
You have opened job ` + strJobUUID + `
Close Window `; //Return Response callback(null, { eventResponse: strHTMLResponse }); };ο»Ώ