question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

tsc-watch isn't compatible with Typescript Project References

See original GitHub issue

When running tsc -w with project references, I need to include the -b / --build flag so that project references are also compiled, and the compiler will be run whenever files in those local dependencies are refreshed as well. It doesn’t seem that there’s a way to include this flag in tsc-watch

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

5reactions
wistoftcommented, Jun 3, 2020

It works for my project. I have a script in: packages/dev/server.ts

A package.json entry along the lines of:

"tscWatch": "tsc-watch -b packages/dev/tsconfig.json --onSuccess \"node dist/dev/server.js\"",

tsc needs a -b switch to activate project references.

0reactions
dbousamracommented, Dec 3, 2020

Beautiful

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - Project References
Project references are a new feature in TypeScript 3.0 that allow you to structure your TypeScript programs into smaller pieces.
Read more >
TypeScript project with references
Found this when searching for "typescript references has not been built from source file". My mistake was that I was running tsc -p ......
Read more >
TypeScript Compiling with Visual Studio Code
No, the TypeScript language service that ships with Visual Studio 2019 and 2022 isn't compatible with VS Code. You will need to install...
Read more >
A guide through The Wild Wild West of setting up a mono repo ...
We will be using TypeScript, Yarn workspaces, Lerna, and Jest. ... tsc has had a watch mode since TypeScript's first release, before project...
Read more >
TypeScript rules for Bazel - bazelbuild/rules_nodejs
The only reason to use raw tsc is if you want to compile a directory of .ts files and cannot enumerate them ahead-of-time...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found