Ts-node-dev: --watch is not working

Created on 19 Nov 2020  路  2Comments  路  Source: wclr/ts-node-dev

Issue description

I'm trying to add an arbitrary file to being watched for changes, which isn't working. The change isn't being picked up and the app is not getting auto-restarted.

Now, the docs say I have to use a "chokidar" pattern, and the link to it just goes to the chokidar project page, which leaves me none the wiser. But, I'm assuming that a straight filename (no spaces or any forbidden/weird characters) oughta work.

Context

OS version (is it docker or host?), ts-node-dev version
Windows 10, ts-node-dev 1.0.0

Did you try to run with ts-node?
Not relevant.

Did you try to run with --files option enabled?
Yes, and it doesn't do anything (it's not in the docs, so I didn't expect anything)

Did you try to run with --debug option enabled?
Yup, but I'm not getting any more information than without it:

[INFO] 00:44:33 ts-node-dev ver. 1.0.0 (using ts-node ver. 9.0.0, typescript ver. 4.1.1-rc)

That's it.

Do you have a repro example (git repo) with simple steps to reproduce your problem?
Not yet, but since the problem is not related to any typescript code, the command can be tested against basically any codebase:

ts-node-dev --respawn --transpile-only ./src/app.ts --watch gallery.json --debug

Just make sure that gallery.json exists, and then just give it an edit while the app runs. It won't restart.

Most helpful comment

@thany, I think it is because of the order of params. I have moved watch before the entry script and it started to work:
ts-node-dev --respawn --rs --watch ./**/*.yaml index.ts

All 2 comments

@thany, I think it is because of the order of params. I have moved watch before the entry script and it started to work:
ts-node-dev --respawn --rs --watch ./**/*.yaml index.ts

Really? I'll try that out shortly. Thanks.

That would be a super weird side-effect. Order of arguments shoudn't matter (or alternatively, why should they?)

/edit: It works 馃榾

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Chnapy picture Chnapy  路  6Comments

n1ru4l picture n1ru4l  路  3Comments

kachkaev picture kachkaev  路  11Comments

Derya picture Derya  路  6Comments

DMCTowns picture DMCTowns  路  3Comments