Skip to content
This repository was archived by the owner on Dec 19, 2025. It is now read-only.
This repository was archived by the owner on Dec 19, 2025. It is now read-only.

Question: how can I trigger a respawn if my a dependency changes? #336

@SpencerKaiser

Description

@SpencerKaiser

Issue description

I'm using a mono repo with multiple packages via Yarn Workspaces

When a dependency package changes (/packages/utils for example), how can I trigger a restart in my core app?

Here's my dev script:

"dev": "ts-node-dev --exit-child --watch .env.local --files --rs --respawn src/index.ts",

If I modify a dependency package, I can see the change trigger in node_modules but my app isn't restarting. I've tried:

  • Adding node_modules to my --watch
  • Modifying my tsconfig
  • Using --debug to see if a file change occurred but was being ignore for some reason

Context

OS version (is it docker or host?), ts-node-dev version
macOS Ventura 13.4 (22F66)
ts-node-dev "^2.0.0"

Did you try to run with ts-node?
N/A

Did you try to run with --files option enabled?
Yes

Did you try to run with --debug option enabled?
Yes

Do you have a repro example (git repo) with simple steps to reproduce your problem?
No but I can create one if needed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions