-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
nodemon does not restart with --watch src --exec 'yarn run build && yarn start'
#1006
Comments
Nope, no idea. Can't really give you any better idea without seeing the output or a |
--watch src --exec 'yarn run build && yarn start'
Sorry, should've given more info. The tree of src/
pages/
public/
css/
js/
index.js
scripts/
templates/
404.hbs
index.hbs I've tried changing The output once I start nodemon the first time is this: git:master ❯ nodemon --watch src --exec 'yarn run build && yarn start'
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: /path/to/repo/src/**/*
[nodemon] starting `yarn run build && yarn start`
...
<server starts correctly> I also tried it with: |
Should be |
I have the same problem. Doesn't work whether with trailing slah or not. Nodemon 1.11.0 Explicit file works:
Those don't:
UPDATE FIXED: Sorry guys, after running nodemon in verbose it told me that by default it only watches *.js files. After adding -e ts switch it all works again. nodemon --watch src/ --exec 'node out/index.js' --verbose -e ts |
The following is working for me as a very simple backup solution based on @mcwienczek answer:
This watches all files and if any are changed runs a Windows batch file called backup.bat that only copies changed files to OneDrive. This is the only command that worked for me to get npm to run an arbitrary script. Including other files just for interest. backup.bat
backup-exclude.txt
|
Closing as @philipjmurphy has a workaround for others to use (thank you!). |
make sure your writhing your script are correct try this |
Why would this not work, what am I doing wrong?
nodemon --watch src --exec 'yarn run build && yarn start'
In
src
are all my files. It builds and starts just fine, but does not restart when anything is changed. Any ideas?The text was updated successfully, but these errors were encountered: