tsgo not compiling mono repo projects (and pnpm?)
Created a sample project that reproduce the issues:
https://github.com/eranbo/tsgo-test
About the issues:
- When using mono repo with multiple services / modules using base tsconfig.json with references to inner services / modules the tsgo is not following the references array. When running pnpm run build - old compiler works OK.
- When changing directory to service and running tsgo - an error occured:
$ tsgo
src/main.ts:3:24 - error TS2307: Cannot find module 'body-parser' or its corresponding type declarations.
3 import bodyParser from 'body-parser';
~~~~~~~~~~~~~
Found 1 error in src/main.ts:3
Files: 176
Lines: 95836
Identifiers: 85140
Symbols: 67853
Types: 2965
Instantiations: 8785
Memory used: 52307K
Memory allocs: 250057
Parse time: 0.034s
Bind time: 0.010s
Check time: 0.012s
Emit time: 0.001s
Total time: 0.057s
When running inside the service folder pnpm exec tsc -b tsconfoig.json - old compiler works OK.
Project references are not yet supported.
@jakebailey 10x - looking forward for this feature. what about number 2? the error of Cannot find module 'body-parser'?
Hi,
Just following if there is any news about the 2nd error:
src/main.ts:3:24 - error TS2307: Cannot find module 'body-parser' or its corresponding type declarations.
No news. @EricCornelson has been working on fixing module resolution and the related checker stuff, so it's possible it'll be fixed afterward.
once we have Build mode / project references and ideally Incremental build even if LSP is not there this could still be very useful. one could run go version in watch mode in build mode and this will generate dts files much faster than current tsc, while users will use normal tsc's lsp. i'm looking forward to this being supported
For build mode, see #529
Otherwise, I've confirmed that this module resolution bug has been fixed.
Thanks for the update, looking forward for testing it