Open pursual opened 1 year ago
This basically makes it impossible to use when including custom code from a shared layer.
I've not got the time to do a fix and PR, but if anyone wants to do so, or just fix your copy for now, you can do by by editing get-dependency-list.js.
Find the two calls to handle() and wrap that in an IF statement: if (dependency.substring(0,5) !== "/opt/")
Very rough and ready, bit it will get you going for now.
/serverless-plugin-include-dependencies/get-dependency-list.js:82:66
const pathToModule = resolve.sync(path.join(moduleName, 'package.json'), { basedir });
throws an error that is uncaught, because moduleName is null: