I have a common npm module containing TypeScript which is an node module providing some classes and functionality. This module is packaged via browserify
+ tsify
and also exports the declaration files and built with gulp.
I have another npm module using TypeScript which imports this module locally via file:../modulename
and tries to use functionality from the first module. The second module is also packaged via browserify
+ tsify
and built with gulp
. The compilation of the second module works via npx tsc
, but fails if I execute the gulp build file with the error message
Error: Cannot find module './AbstractClass' from 'folderInOtherModuleContainingTheJSFiles'
Interestingly it sometimes fails with this Class sometimes with another, so it seems there is also some kind of concurrent processing.
I extracted the failing code from my project and created a minimal example with this behavior here.
npm version: 5.6.0
node version: v9.5.0