[ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
Hi All,
we are seeing the error "[ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined" after adding the serverless-bundle plugin.
error stack: erverless: Auto instrumenting functions with Datadog Serverless: Adding Lambda Layers to functions Serverless: Compiling with Typescript... Serverless: Using local tsconfig.json Serverless: Typescript compiled. Serverless: Invoke webpack:validate Serverless: Invoke webpack:compile Serverless: Bundling with Webpack... Serverless: Invoke webpack:package Serverless: No external modules needed Serverless: Packaging service...
Type Error ---------------------------------------------
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at new NodeError (node:internal/errors:277:15)
at validateString (node:internal/validators:123:11)
at Object.basename (node:path:1156:5)
at TypeScriptPlugin.
in serverless.yml
plugin:
- serverless-plugin-typescript
- serverless-plugin-datadog
- serverless-plugin-include-dependencies
- serverless-dependson-plugin
- serverless-offline
- serverless-bundle
Thank you
I only get this error when working with layers (for the entire node_modules) and try to deploy only one function... No problems to deploy the entire stack... No problems when not using layers, to deploy a single function...
@Marcosl14
Did you have serverless.yml and tsconfig.json in different locations? I do and I can't make it work at all
No... They are in the same location...