File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ parentPort.on("message", async (data) => {
2222 // execute code to get the data into global.lambdas
2323 const codeFile = await fs . readFile ( data . compileOutput , "utf8" ) ;
2424
25- fixCdkPaths ( ) ;
25+ await fixCdkPaths ( workerData . awsCdkLibPath ) ;
2626
2727 eval ( codeFile ) ;
2828
@@ -54,12 +54,11 @@ parentPort.on("message", async (data) => {
5454/**
5555 * Some paths are not resolved correctly in the CDK code, so we need to fix them
5656 */
57- function fixCdkPaths ( ) {
58- //const path = require("path"); // leave this line for manual debugging
57+ async function fixCdkPaths ( awsCdkLibPath ) {
58+ // leave this lines for manual debugging
59+ //const awsCdkLibPath = path.resolve("node_modules/aws-cdk-lib");
60+ //const path = require("path");
5961
60- // Get the path to the aws-cdk-lib module
61- let awsCdkLibPath = require . resolve ( "aws-cdk-lib" ) ;
62- awsCdkLibPath = awsCdkLibPath . replace ( "/index.js" , "" ) ;
6362 Logger . verbose ( `[CDK] [Worker] aws-cdk-lib PATH ${ awsCdkLibPath } ` ) ;
6463
6564 const pathsFix = {
You can’t perform that action at this time.
0 commit comments