Closed tomi closed 1 year ago
@lukeed is this something you'd be able to take a look at? 🙂
A quick repro with just the package.json of aws-cdk-lib
and resolve.exports
:
Throws Error: Missing ".warnings.jsii.js" export in "aws-cdk-lib" package
Issue appears to be in line 65. I took a stab at fixing it with https://github.com/lukeed/resolve.exports/pull/20
If you're coming here because Jest tests are failing, adding this to our Jest config worked for us:
"moduleNameMapper": { "^aws-cdk-lib/.warnings.jsii.js$": "<rootDir>/node_modules/aws-cdk-lib/.warnings.jsii.js" },
Thanks @ErikMikkelson
Hi,
It seems that resolving fails if the
exports
map has a file that start with dot (.
). For exampleaws-cdk-lib
has an export like this.If I understood correctly, the bug is in
index.js
on line 65.I also created a git repo that demonstrates the bug in real use case with
jest
andaws-cdk-lib