Closed bcheung closed 2 months ago
Hey @bcheung thanks for flagging, will try to look into it this weekend
@bcheung This error is being thrown from the mongoose-tsgen code, right here. This isn't trivial to fix, we're currently using the extends
field to find other tsconfig.json files and load in their paths
fields, which ensures TS path resolution works. But we would need to resolve aliases fully to find aliased paths.
Could you provide a simple reproduction repo? Would help a lot with fixing
Thanks @orgads will look this weekend
Sorry the for delay, will try to get to this shortly
@bcheung @orgads fix is live in v9.4.3 🚀 path resolving and tsconfig parsing is much more robust now, using the node resolve
module and not overwriting the user's compilerOptions.module
field
Noticed a bug with tsconfig parsing of certain other compilerOptions.module
options (not with your use case but other use cases), so pushed a further fix in v9.4.4. Try that one out, it should work for you as well.
Hello! I believe ts-node needs to be upgraded to fix a tsconfig.json issue with monorepos.
I'm getting this error below when I try to run mtgen:
I have a monorepo setup where my tsconfig.json file extends a base tsconfig installed from a package:
Using a relative path works in my tsconfig.json:
See a similar issue here was solved with upgrading ts-node to v10.9.2: https://github.com/microsoft/TypeScript/issues/56847#issuecomment-1873956762