-
-
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
Does not exclude node_modules when watching parent to cwd #1246
Comments
Can you try this first. You're getting the |
Another question (sorry, I found your issue a bit confusing to follow), when nodemon is failing on this:
Did you expect nodemon to watch these, or not? |
no should not watch any files in a node_modules folder (that is supposed to be the default) and it does work normally when watched files are under the cwd. But here I am asking to watch in a parent to cwd and that's where the issue arises. FYI, After throwning those nodemon exists |
I can up the number of inoftify watches but it's only reaching that huge number because it's watching node_modules/ folder files. The actual repos in the parent only come to maybe 50 all totalo if their respective node_modules folders are excluded, but that is not the case they are being included. |
assuming this deosn't happen for you using |
Okay, I follow what's happening. node_modules are ignored relative from the root, so it's including those that are not hanging off the cwd. I'll mark as a bug and take a shot at a fix when I have time, unless you raise a PR first. |
I'd like to tackle a PR but probably not going to happen. Not a big deal at this moment but something nice to have when I am developing multiple dependent modules concurrently. Can wait. Thx |
BTW because of your log message in nodemon install I started participating in the open collective. When they get paypal going even with some $, good idea that. So no PR :-( but appreciate your efforts and try to repay with putting out useful repos made on the shoulders of projects like nodemon. |
* docs: add sponsors [skip ci] * fix: make watch & ignore relative Fixes #1246 * fix: relative parent watching and ignore * chore: lint * test: fix bail on options
Thanks for raising this issue, and hopefully you're happy with @remy's fix. If you'd like to support this project, you can do just that through the open collective https://opencollective.com/nodemon/donate or at the very least, starring this project would give me @remy a little smile ❤️ |
nodemon -v
: 1.14.2node -v
: 9.4"node_modules/.bin/nodemon --require @std/esm --watch ../ examples/bus",
Expected behaviour
runs without issue
Actual behaviour
the watcher is watching node_modules folders and throws errors
Steps to reproduce
set up a two repos. Fire up nodemon in one repo (cwd) but watch the parent folder for both repos (
--watch ../
).Note: The repo running the code with nodemon has dependencies I am changing in the other allied repo(s) thus my desire to watch them. I import those module dependencies directly during during development before publishing and using npm for import since they too are under development and was wanting nodemon to watch them.
output when running the command above. uci/uci-logger is another repo/directory. The CWD was uci/uci-bus.
[nodemon] 1.14.12
[nodemon] to restart at any time, enter
rs
[nodemon] watching: /opt/uci/**/*
[nodemon] starting
node --require @std/esm examples/bus src/bus
{ id: 'i2c-bus', us: { path: '/opt/uci/unix.sock' } }
[nodemon] Internal watch failed: watch /opt/uci/uci-base/node_modules/urlgrey/package.json ENOSPC
[nodemon] Internal watch failed: watch /opt/uci/uci-logger/node_modules/make-dir/node_modules/pify/readme.md ENOSPC
If applicable, please append the
--dump
flag on your command and include the output here ensuring to remove any sensitive/personal details or tokens.The text was updated successfully, but these errors were encountered: