cdktf install - getting 'EINVAL' -4048 - unable to install
Bump into this error while trying to install cdktf binaries
scripts/check-prebuild.js || prebuild-install || node scripts/install.js
2353 info run @cdktf/node-pty-prebuilt-multiarch@0.10.1-pre.11 install { code: 1, signal: null }
2354 warn cleanup Failed to remove some directories [
2354 warn cleanup [
2354 warn cleanup [Error: EPERM: operation not permitted, rmdir 'AppData\Roaming\npm\node_modules\cdktf-cli\node_modules\@sentry-internal'] {
2354 warn cleanup errno: -4048,
2354 warn cleanup code: 'EPERM',
2354 warn cleanup syscall: 'rmdir',
2354 warn cleanup path: 'AppData\\Roaming\\npm\\node_modules\\cdktf-cli\\node_modules\\@sentry-internal'
2354 warn cleanup }
2354 warn cleanup ],
I am using node 22.x and then i had to remove and re-install node 20.x. In the new installation, i checked the option to allow node automatically download tools to rebuild certain modules.
Then re-run
npm install --global cdktf-cli@latest
Comments