-
Notifications
You must be signed in to change notification settings - Fork 12.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tsc --watch doesn't work in docker container #54144
Comments
Are you changing files that are located inside of docker container or mounted from host system? |
If your OS isn't providing watch events, then you can use a polling based watch strategy in your TS config or command line: https://www.typescriptlang.org/tsconfig#watchOptions |
The issue originated from a binding mount with the Windows host filesystem. As advised by @RyanCavanaugh , the polling method can also be used. In my case, I resolved the problem by moving the files to the WSL2 file system. I first created the project on the WSL2 file system, then mounted the directory to the container. This allowed for |
I have the same problem on Windows. Watch won't work for files in There is a lot of confusion about bind mounts on Windows: do the bind mount completly screw the watch functionality of all tools relying on watch events (TypeScript, Rollup, and many more...)... when editing from withing the container and Windows itself? |
Same here, currently using a nodejs devcontainer with vscode, and |
I'm running Node inside Docker on my Windows computer, and configuring these settings fixed the issue for me.
|
I'm currently having the same issue. Windows 11 host running a docker container with volume mounts. This is with polling enabled
|
Bug Report
🔎 Search Terms
watch container
🕗 Version & Regression Information
tsc --watch
functioned correctly.node:20
->tsc --watch
was unsuccessfulmcr.microsoft.com/devcontainers/typescript-node:0-20
->tsc --watch
didn't work either⏯ Playground Link
this is not about code.
💻 Code
this is not about code
🙁 Actual behavior
It appears that
tsc
is unable to detect file changes in the container.tsc --watch
🙂 Expected behavior
it works fine with my windosw11
The text was updated successfully, but these errors were encountered: