CDKTF - Prebuild binary missing for platform win32

When I try to install CDKTF via npm install --global cdktf-cli@latest, I’m getting the following error: Prebuild binary missing for platform win32. Based on the log it is linked with this package: @cdktf\node-pty-prebuilt-multiarch. Installing this package separately with npm i @cdktf/node-pty-prebuilt-multiarch results in the same error. How can this be fixed please ?

Environment

  • OS: Windows 11
  • Node: 24.7.0
  • npm: 11.6.0
2902 info run @cdktf/node-pty-prebuilt-multiarch@0.10.2 install { code: 1, signal: null }
2903 warn cleanup Failed to remove some directories [
2903 warn cleanup   [
2903 warn cleanup     '\\\\?\\C:\\Users\\stefa\\AppData\\Roaming\\npm\\node_modules\\cdktf-cli',
2903 warn cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Users\stefa\AppData\Roaming\npm\node_modules\cdktf-cli\node_modules\@inquirer\confirm\node_modules'] {
2903 warn cleanup       errno: -4048,
2903 warn cleanup       code: 'EPERM',
2903 warn cleanup       syscall: 'rmdir',
2903 warn cleanup       path: 'C:\\Users\\stefa\\AppData\\Roaming\\npm\\node_modules\\cdktf-cli\\node_modules\\@inquirer\\confirm\\node_modules'
2903 warn cleanup     }
2903 warn cleanup   ],
2903 warn cleanup   [
2903 warn cleanup     'C:\\Users\\stefa\\AppData\\Roaming\\npm\\node_modules\\cdktf-cli',
2903 warn cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Users\stefa\AppData\Roaming\npm\node_modules\cdktf-cli\node_modules\@cdktf\cli-core\templates\java\src\main\java'] {
2903 warn cleanup       errno: -4048,
2903 warn cleanup       code: 'EPERM',
2903 warn cleanup       syscall: 'rmdir',
2903 warn cleanup       path: 'C:\\Users\\stefa\\AppData\\Roaming\\npm\\node_modules\\cdktf-cli\\node_modules\\@cdktf\\cli-core\\templates\\java\\src\\main\\java'
2903 warn cleanup     }
2903 warn cleanup   ],
2903 warn cleanup   [
2903 warn cleanup     '\\\\?\\C:\\Users\\stefa\\AppData\\Roaming\\npm\\node_modules\\cdktf-cli\\node_modules',
2903 warn cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Users\stefa\AppData\Roaming\npm\node_modules\cdktf-cli\node_modules\cdktf\node_modules\lazystream'] {
2903 warn cleanup       errno: -4048,
2903 warn cleanup       code: 'EPERM',
2903 warn cleanup       syscall: 'rmdir',
2903 warn cleanup       path: 'C:\\Users\\stefa\\AppData\\Roaming\\npm\\node_modules\\cdktf-cli\\node_modules\\cdktf\\node_modules\\lazystream'
2903 warn cleanup     }
2903 warn cleanup   ]
2903 warn cleanup ]
2904 verbose stack Error: command failed
2904 verbose stack     at promiseSpawn (C:\Users\stefa\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:22:22)
2904 verbose stack     at spawnWithShell (C:\Users\stefa\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:124:10)
2904 verbose stack     at promiseSpawn (C:\Users\stefa\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:12:12)
2904 verbose stack     at runScriptPkg (C:\Users\stefa\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\run-script\lib\run-script-pkg.js:79:13)
2904 verbose stack     at runScript (C:\Users\stefa\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\run-script\lib\run-script.js:9:12)
2904 verbose stack     at C:\Users\stefa\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\rebuild.js:331:17
2904 verbose stack     at run (C:\Users\stefa\AppData\Roaming\npm\node_modules\npm\node_modules\promise-call-limit\dist\commonjs\index.js:67:22)
2904 verbose stack     at C:\Users\stefa\AppData\Roaming\npm\node_modules\npm\node_modules\promise-call-limit\dist\commonjs\index.js:84:9
2904 verbose stack     at new Promise (<anonymous>)
2904 verbose stack     at callLimit (C:\Users\stefa\AppData\Roaming\npm\node_modules\npm\node_modules\promise-call-limit\dist\commonjs\index.js:35:69)
2905 verbose pkgid @cdktf/node-pty-prebuilt-multiarch@0.10.2
2906 error code 1
2907 error path C:\Users\stefa\AppData\Roaming\npm\node_modules\cdktf-cli\node_modules\@cdktf\node-pty-prebuilt-multiarch
2908 error command failed
2909 error command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/check-prebuild.js || prebuild-install || node scripts/install.js
2910 error Prebuild binary missing for platform win32
2910 error (node:71376) [DEP0176] DeprecationWarning: fs.R_OK is deprecated, use fs.constants.R_OK instead
2910 error (Use `node --trace-deprecation ...` to show where the warning was created)
2910 error prebuild-install warn install No prebuilt binaries found (target=24.7.0 runtime=node arch=x64 libc= platform=win32)
2910 error node:internal/child_process:421
2910 error     throw new ErrnoException(err, 'spawn');
2910 error     ^
2910 error
2910 error Error: spawn EINVAL
2910 error     at ChildProcess.spawn (node:internal/child_process:421:11)
2910 error     at spawn (node:child_process:796:9)
2910 error     at Object.<anonymous> (C:\Users\stefa\AppData\Roaming\npm\node_modules\cdktf-cli\node_modules\@cdktf\node-pty-prebuilt-multiarch\scripts\install.js:11:20)
2910 error     at Module._compile (node:internal/modules/cjs/loader:1738:14)
2910 error     at Object..js (node:internal/modules/cjs/loader:1871:10)
2910 error     at Module.load (node:internal/modules/cjs/loader:1470:32)
2910 error     at Module._load (node:internal/modules/cjs/loader:1290:12)
2910 error     at TracingChannel.traceSync (node:diagnostics_channel:322:14)
2910 error     at wrapModuleLoad (node:internal/modules/cjs/loader:238:24)
2910 error     at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:154:5) {
2910 error   errno: -4071,
2910 error   code: 'EINVAL',
2910 error   syscall: 'spawn'
2910 error }
2910 error
2910 error Node.js v24.7.0
2911 silly unfinished npm timer reify 1757614123019
2912 silly unfinished npm timer reify:build 1757614142619
2913 silly unfinished npm timer build 1757614142621
2914 silly unfinished npm timer build:deps 1757614142621
2915 silly unfinished npm timer build:run:install 1757614142761
2916 silly unfinished npm timer build:run:install:node_modules/cdktf-cli/node_modules/@cdktf/node-pty-prebuilt-multiarch 1757614142761
2917 verbose cwd C:\Windows\System32
2918 verbose os Windows_NT 10.0.26100
2919 verbose node v24.7.0
2920 verbose npm  v11.6.0
2921 verbose exit 1
2922 verbose code 1
2923 error A complete log of this run can be found in: C:\Users\stefa\AppData\Local\npm-cache\_logs\2025-09-11T18_08_42_666Z-debug-0.log