"fix" Cannot read property 'resolvedModules' - #727
Conversation
|
Thank you for bringing up the issue and for the PR! The suggested fix seems to be harmless, but I'd like to first understand what's going on in more detail. My mental model was this: If a file is somehow imported and Typescript acknowledges it, such a file must exist, so I tried to reproduce the error message but with no avail so far. You've mentioned that Could you please debug a bit on how |
|
It's probably worth mentioning that I think the other thing getting stuck like this was a compiled js file, and bit actually a typescript module. Tomorrow when I get back to the office I'll try to create a repeatable build using those packages. |
With the latest version I'm still getting this error in our project
I traced the error to this package here, that's being reference by a different package we're using, grapesjs. We're not directly including
events, it's only being included bygrapesjs.We actually had a different package that we had installed with npm that was also getting this error, but it wasn't being used, so I just removed it, but we still had the issue with the
eventspackage.grapesjsis an extern specified in our project,eventsis not.Not exactly sure what's happening, but for those files, the
<SourceFileWithInternalAPIs>this.host.getSourceFile(fileName);line is simply returning "undefined" which stops our compiling, but if I just treat the code as if it can be undefined then everything compiles without problems.We've been running an older fork doing exactly this in production for probably a year or longer now and never noticed any issues, until I tried using this new version again, so we have to fork it for our use once more.