もしかすると
これで解決するかも?
tl; dr
npm install aws-cdk@2.18.0
何が起きるか
2.20.0 を入れようとすると
% npm install aws-cdk@2.20.0
npm WARN tar zlib: incorrect data check
npm WARN tarball cached data for aws-cdk@https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.20.0.tgz (sha512-rs9LTpvrlbsMcenZ3t7TuLDGbHhbnDocrE63Xb2PT++VptR/A8svllK8k1W7hPl77L9QS75GNK5gh+ShkEzsnw==) seems to be corrupted. Refreshing cache.
npm WARN tarball tarball data for aws-cdk@https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.20.0.tgz (sha512-rs9LTpvrlbsMcenZ3t7TuLDGbHhbnDocrE63Xb2PT++VptR/A8svllK8k1W7hPl77L9QS75GNK5gh+ShkEzsnw==) seems to be corrupted. Trying again.
npm WARN tar zlib: incorrect data check
npm WARN tarball tarball data for aws-cdk@https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.20.0.tgz (sha512-rs9LTpvrlbsMcenZ3t7TuLDGbHhbnDocrE63Xb2PT++VptR/A8svllK8k1W7hPl77L9QS75GNK5gh+ShkEzsnw==) seems to be corrupted. Trying again.
npm ERR! code Z_DATA_ERROR
npm ERR! errno -3
npm ERR! zlib: incorrect data check
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2022-04-14T12_39_20_908Z-debug-0.log
2.19.0 を入れようとすると
% npm install aws-cdk@2.19.0
npm WARN tar zlib: incorrect data check
npm WARN tarball cached data for aws-cdk@https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.19.0.tgz (sha512-qOwxDKd1xKsiBW3laYrFBiAF510okJvslEeHViO08SKIyhitUe/HTn2iqfdVBb/zF6wSdm/sRsj2WNHpiKFcBQ==) seems to be corrupted. Refreshing cache.
npm WARN tarball tarball data for aws-cdk@https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.19.0.tgz (sha512-qOwxDKd1xKsiBW3laYrFBiAF510okJvslEeHViO08SKIyhitUe/HTn2iqfdVBb/zF6wSdm/sRsj2WNHpiKFcBQ==) seems to be corrupted. Trying again.
npm WARN tar zlib: incorrect data check
npm WARN tarball tarball data for aws-cdk@https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.19.0.tgz (sha512-qOwxDKd1xKsiBW3laYrFBiAF510okJvslEeHViO08SKIyhitUe/HTn2iqfdVBb/zF6wSdm/sRsj2WNHpiKFcBQ==) seems to be corrupted. Trying again.
npm ERR! code Z_DATA_ERROR
npm ERR! errno -3
npm ERR! zlib: incorrect data check
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2022-04-14T12_39_31_004Z-debug-0.log
こんな感じです。
何度 trying againg しても改善されず、配信経路のどこかがぶっ壊れてると思うので、今は大人しく v1 系とか v2.18.0 を使うのが安定っぽいです。
NOTICES
19836 AWS CDK v1 entering maintenance mode soon
Overview: AWS CDK v1 is entering maintenance mode on June 1, 2022. Migrate to AWS CDK v2 to continue to get the latest features and fixes! Affected versions: framework: 1.*, cli: 1.* More information at: https://github.com/aws/aws-cdk/issues/19836
(こんな感じでv2にしろと焦らせてきますが、今やるのは多分まずい気がします。まともに動くものが出ていない。)