Skip to content
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

watch mode not working with git worktree #548

Open
2 tasks done
monkoninja opened this issue Sep 7, 2022 · 4 comments
Open
2 tasks done

watch mode not working with git worktree #548

monkoninja opened this issue Sep 7, 2022 · 4 comments
Labels
bug Confirmed bug help wanted Help the community by contributing to this issue

Comments

@monkoninja
Copy link

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

4.0.0

Plugin version

No response

Node.js version

16.17.0

Operating system

Linux

Operating system version (i.e. 20.04, 11.3, 10)

20.04

Description

At #547, I mistakenly assumed that watch mode was not working because of esm, in fact, watch mode is not working if the project is in the git worktree.
If you use typescript, then typescript rebuilds the project, but the server still does not restart.

Steps to Reproduce

git clone https://github.com/railwayapp-templates/fastify --bare
cd fastify.git
git worktree add main
cd main
npm i
npm run dev

change any file -> typescript rebuild -> server does not restart

Expected Behavior

No response

@mcollina
Copy link
Member

mcollina commented Sep 7, 2022

What's special with worktree that breaks this? We just use normal OS file watching.

@monkoninja
Copy link
Author

I'm not sure what the problem is, so far I'm using nodemon. It works with worktree.

@mcollina mcollina added bug Confirmed bug help wanted Help the community by contributing to this issue labels Sep 9, 2022
@nooreldeensalah
Copy link
Contributor

nooreldeensalah commented Sep 19, 2022

I couldn't reproduce this on my end, I followed the steps you listed.

My environment:

  • OS → Windows 10 (21H1)
  • Node Version → 16.17.0
  • Fastify-CLI Version → 5.4.2

@Eomm
Copy link
Member

Eomm commented Sep 24, 2022

I think the source of the issue starts from here:
nodejs/node#36005

and leads to the chokidar module's funding

If we drop that module, we should go for the node:fs.watch one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug help wanted Help the community by contributing to this issue
Projects
None yet
Development

No branches or pull requests

4 participants