serverless-plugin-typescript
serverless-plugin-typescript copied to clipboard
Don't try to access properties of undefined diagnostic file object
When compiling with node20.x or node22.x, I got this error:
{
file: undefined,
start: undefined,
length: undefined,
code: 2688,
category: 1,
messageText: {
messageText: "Cannot find type definition file for 'glob'.",
category: 1,
code: 2688,
next: [ [Object] ]
},
relatedInformation: undefined
}
Error:
TypeError: Cannot read properties of undefined (reading 'getLineAndCharacterOfPosition')
at node_modules/serverless-plugin-typescript/dist/src/typescript.js:85:57