We have an infrastructure policy in our organisation which handles roles and policies for users and their groups. Up until a week ago it was working fine, all of a suden we got an error of CompileError: WebAssembly.Module(): invalid value type 'externref', enable with --experimental-wasm-reftypes @+139
Full error:
[Container] 2025/06/10 07:38:43.823217 Entering phase INSTALL
[Container] 2025/06/10 07:38:44.010047 Running command npm install -g aws-cdk@2
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'aws-cdk@2.1018.0',
npm WARN EBADENGINE required: { node: '>= 18.0.0' },
npm WARN EBADENGINE current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
added 1 package, and audited 2 packages in 2s
found 0 vulnerabilities
[Container] 2025/06/10 07:38:57.567134 Phase complete: INSTALL State: SUCCEEDED
[Container] 2025/06/10 07:38:57.567159 Phase context status code: Message:
[Container] 2025/06/10 07:38:57.600748 Entering phase PRE_BUILD
[Container] 2025/06/10 07:38:57.602280 Phase complete: PRE_BUILD State: SUCCEEDED
[Container] 2025/06/10 07:38:57.602304 Phase context status code: Message:
[Container] 2025/06/10 07:38:57.635095 Entering phase BUILD
[Container] 2025/06/10 07:38:57.636458 Running command cdk -a . deploy ProdPoliciesInfrastructureStack --require-approval=never --verbose
/usr/local/lib/node_modules/aws-cdk/lib/index.js:318057
var wasmModule = new WebAssembly.Module(bytes);
^
CompileError: WebAssembly.Module(): invalid value type 'externref', enable with --experimental-wasm-reftypes @+139
at ../../node_modules/cdk-from-cfn/index.js (/usr/local/lib/node_modules/aws-cdk/lib/index.js:318057:22)
at __require (/usr/local/lib/node_modules/aws-cdk/lib/index.js:17:50)
at lib/commands/migrate.ts (/usr/local/lib/node_modules/aws-cdk/lib/index.js:319064:28)
at __init (/usr/local/lib/node_modules/aws-cdk/lib/index.js:14:56)
at lib/cli/cdk-toolkit.ts (/usr/local/lib/node_modules/aws-cdk/lib/index.js:319350:5)
at __init (/usr/local/lib/node_modules/aws-cdk/lib/index.js:14:56)
at lib/cli/cli.ts (/usr/local/lib/node_modules/aws-cdk/lib/index.js:355329:5)
at __init (/usr/local/lib/node_modules/aws-cdk/lib/index.js:14:56)
at Object.<anonymous> (/usr/local/lib/node_modules/aws-cdk/lib/index.js:355577:14)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
[Container] 2025/06/10 07:38:58.559497 Command did not exit successfully cdk -a . deploy ProdPoliciesInfrastructureStack --require-approval=never --verbose exit status 1
[Container] 2025/06/10 07:38:58.562876 Phase complete: BUILD State: FAILED
[Container] 2025/06/10 07:38:58.562892 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: cdk -a . deploy ProdPoliciesInfrastructureStack --require-approval=never --verbose. Reason: exit status 1
[Container] 2025/06/10 07:38:58.597064 Entering phase POST_BUILD
[Container] 2025/06/10 07:38:58.598907 Phase complete: POST_BUILD State: SUCCEEDED
[Container] 2025/06/10 07:38:58.598921 Phase context status code: Message:
[Container] 2025/06/10 07:38:58.662763 Set report auto-discover timeout to 5 seconds
[Container] 2025/06/10 07:38:58.662901 Expanding base directory path: .
[Container] 2025/06/10 07:38:58.665250 Assembling file list
[Container] 2025/06/10 07:38:58.665265 Expanding .
[Container] 2025/06/10 07:38:58.667702 Expanding file paths for base directory .
[Container] 2025/06/10 07:38:58.667719 Assembling file list
[Container] 2025/06/10 07:38:58.667723 Expanding **/*
[Container] 2025/06/10 07:38:58.670351 No matching auto-discover report paths found
[Container] 2025/06/10 07:38:58.670431 Report auto-discover file discovery took 0.007668 seconds
[Container] 2025/06/10 07:38:58.670446 Phase complete: UPLOAD_ARTIFACTS State: SUCCEEDED
[Container] 2025/06/10 07:38:58.670500 Phase context status code: Message:
package.json:
{
"name": "nordic-annalect-policies-infrastructure",
"version": "0.1.0",
"bin": {
"nordic-annalect-policies-infrastructure": "bin/nordic-annalect-policies-infrastructure.js"
},
"scripts": {
"build": "tsc",
"watch": "tsc -w",
"test": "jest",
"cdk": "cdk"
},
"devDependencies": {
"@types/jest": "^29.4.4",
"@types/node": "^18.15.3",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.7.0",
"eslint-plugin-prettier": "^4.2.1",
"jest": "^29.5.0",
"prettier": "^2.8.4",
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1",
"typescript": "^4.9.5"
},
"dependencies": {
"aws-cdk": "^2.69.0",
"aws-cdk-lib": "^2.69.0",
"constructs": "^10.1.279",
"electron-to-chromium": "^1.4.331",
"outdated": "^0.1.1",
"source-map-support": "^0.5.21"
},
"jest": {
"moduleFileExtensions": [
"js"
]
}
}
Not sure where this came from as we didn't update anything or added anything new. Can someone help me out on this one?