The repository demonstrates a TypeScript's module resolution problem, under the following conditions:
- Package
chas a local workspace dependency on packagesaandb. - Package
bhas a dependency on a released version of packagea. Generally the package would be taken from NPM, but for simplicity, here we're using a locally packaged version at./packages/a/a-1.0.0.tgz. - Version of local package
amatches the released version.
With the above setup, if local package a has new APIs that are used in package c, depending on the order of imports, TypeScript build might fail (see ./packages/c/src/index.ts).
- Clone the repository.
- Run
pnpm install. - Run
pnpm build. - Notice that build of packagecfails.