serverless-bundle
serverless-bundle copied to clipboard
DEBUG error while getting callsite source context: ENOENT: no such file or directory
Wondering if someone could point me in the right direction on this. I have a fairly simple testing function setup using serverless-bundle in which I am receiving a bunch of messages in cloudwatch when it is run.

Example
2020-07-18T12:12:05.926Z 4423b254-bc6b-4399-85af-5f14fd21ea68 DEBUG error while getting callsite source context: ENOENT: no such file or directory, open '/var/task/src/functions/webpack:/Users/localuser/[LOCAL PATH]/src/functions/orderHistory.js'
It seems to be referring to the [LOCAL PATH] (removed/cleaned for this issue) within the error/message.
Function example:
const handlerFunc = async (event, context) => {
context.callbackWaitsForEmptyEventLoop = false;
try {
if (pool === null) {
pool = await sql.connect(config);
}
console.log("throwing from try");
throw new CreateError(400, "user id error");
} catch (err) {
// Capture Error in Serverless, will also console.error the err object
context.serverlessSdk.captureError(err);
console.log("throwing from catch");
throw new CreateError.UnprocessableEntity();
}
};
export const handler = middy(handlerFunc).use(cors()).use(httpErrorHandler());
This seems to come up when I have the following serverless configuration
package:
individually: true
-- and using the default bundle / sourcemaps true.
Hmmm can you create a test repo with the issue? It looks like some files aren't getting included correctly?
@VED-StuartMorris did you solve this somehow? Experiencing the same
@VED-StuartMorris has this been solved yet?