To reproduce the jsii-pacmak issue described here aws/jsii#4178, follow below steps:
Install yarn globally: npm install -g yarn
- git clone https://github.com/lalitkumarbTR/jsii-pacmak-issue.git
- cd jsii-pacmak-issue
- yarn install
- yarn build
- yarn copy:modules
- yarn build:mycdk
Navigate to "packages/mycdk-lib/node_modules/@aws-sdk/util-utf8-browser" and you will notice there are three "dist-" folders. These three "dist-*" folders will be missing in the tarball after packaging using jsii-pacmak.
Now package the artifact using jsii-pacmak:
- yarn pack:mycdk
Inside, "packages/mycdk-lib/dist/js" you will see the artifact. Go to that dir:
cd packages/mycdk-lib/dist/js
Extract the tarball:
tar -xvf mycdk@0.0.1.jsii.tgz
It will extract the artifact into "package" folder. Inside it, go to "package/node_modules/@aws-sdk/util-utf8-browser/". You will notice that the "dist-*" folders are missing.