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) => {
22
22
// execute code to get the data into global.lambdas
23
23
const codeFile = await fs . readFile ( data . compileOutput , "utf8" ) ;
24
24
25
- fixCdkPaths ( ) ;
25
+ await fixCdkPaths ( workerData . awsCdkLibPath ) ;
26
26
27
27
eval ( codeFile ) ;
28
28
@@ -54,12 +54,11 @@ parentPort.on("message", async (data) => {
54
54
/**
55
55
* Some paths are not resolved correctly in the CDK code, so we need to fix them
56
56
*/
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");
59
61
60
- // Get the path to the aws-cdk-lib module
61
- let awsCdkLibPath = require . resolve ( "aws-cdk-lib" ) ;
62
- awsCdkLibPath = awsCdkLibPath . replace ( "/index.js" , "" ) ;
63
62
Logger . verbose ( `[CDK] [Worker] aws-cdk-lib PATH ${ awsCdkLibPath } ` ) ;
64
63
65
64
const pathsFix = {
You can’t perform that action at this time.
0 commit comments