Closed vbryan closed 3 years ago
There's bug for google cloud functions. Example: serverless.yml: functions: exportProduct: handler: exportProduct
functions:
exportProduct:
handler: exportProduct
getHandlerFilename(hanlder) returns exportProduc
Possible solution: getHandlerFilename(handler) { const lastDotIndex = handler.lastIndexOf('.'); const handlerPath = handler.slice(0, lastDotIndex !== -1 ? lastDotIndex : 0); return require.resolve((path.join(this.serverless.config.servicePath, handlerPath))); }
getHandlerFilename(handler) {
const lastDotIndex = handler.lastIndexOf('.');
const handlerPath = handler.slice(0, lastDotIndex !== -1 ? lastDotIndex : 0);
return require.resolve((path.join(this.serverless.config.servicePath, handlerPath)));
}
I don't use GCP but if you can contribute a fix I would happily merge this
@dougmoscrop I think we can close this due to #55
Sounds good, feel free to reopen if needed!
There's bug for google cloud functions. Example: serverless.yml:
functions:
exportProduct:
handler: exportProduct
getHandlerFilename(hanlder) returns exportProduc
Possible solution:
getHandlerFilename(handler) {
const lastDotIndex = handler.lastIndexOf('.');
const handlerPath = handler.slice(0, lastDotIndex !== -1 ? lastDotIndex : 0);
return require.resolve((path.join(this.serverless.config.servicePath, handlerPath)));
}