Comments (19)
The server didn't restart when I edit one of the file in a subfolder. I'm on the latest version
from nodemon.
achieved with **/*.less
full command i use
nodemon --watch **/*.less --ext less --exec 'npm run build-less'
from nodemon.
Which platform are you running under?
Due to a bug in node on windows it now means there's two different methods to watching for change.
Sent from my iPhone
On 15 Feb 2012, at 09:22, Tylor Reynolds [email protected] wrote:
I running into an issue where nodemon is not restarting my app when any files in sub-directories are changed.
I am running a socketstream app
I call nodemon using the following command:sudo nodmon app.js
The server only restarts if I change root files
I can get the server to restart if I add watches to the command
sudo nodemon -w . -w server/rpc/ app.js
Now it will listen to changes in the root folder and the server/rpc/ folder
Reply to this email directly or view it on GitHub:
#66
from nodemon.
I am running Ubuntu Server 10.04
from nodemon.
I wanted to figure out how to do recursive file watches so I came up with this:
var fs = require('fs');
var callback = function(event, filename) {
console.log(event, filename);
};
var watch = function(file, real) {
var path;
if (!real) {
real = fs.realpathSync(file);
path = real;
} else {
path = real.concat("/", file);
}
real = path;
var stat = fs.statSync(path);
if (stat.isDirectory()) {
fs.watch(path, callback);
var files = fs.readdirSync(path);
for (var _i = 0, _len = files.length; _i < _len; _i++) {
var file = files[_i];
watch(file, real);
}
}
};
watch(".");
from nodemon.
I've actually got the recursive bit in the previous commit of code (before I whipped it out).
Gimme an hour or so and I'll have the fix live. Gotta give it a decent test (now that windows in the scene it slows me down a little :)
On 15 Feb 2012, at 11:08, Tylor Reynolds wrote:
I wanted to figure out how to do recursive file watches so I came up with this:
var fs = require('fs'); var callback = function(event, filename) { console.log(event, filename); }; var watch = function(file, real) { var path; if (!real) { real = fs.realpathSync(file); path = real; } else { path = real.concat("/", file); } real = path; var stat = fs.statSync(path); if (stat.isDirectory()) { fs.watch(path, callback); var files = fs.readdirSync(path); for (var _i = 0, _len = files.length; _i < _len; _i++) { var file = files[_i]; watch(file, real); } } }; watch(".");
Reply to this email directly or view it on GitHub:
#66 (comment)
from nodemon.
Hi remy. I have the same problem with changes to files in subdirectories not being detected. I reverted to 0.5.7 and the problem went away. Using Ubuntu 11.10
from nodemon.
I'm about to push a fix for this - it'll be in 0.6.10 of nodemon.
from nodemon.
Hey. I'm also working on a Socketstream app. Nodemon restarts when files are changed in /server, but not in /server/rpc, or any other subdirectory more than one level deep. Following @porkchop's advice, I was able to get it working with 0.5.7.
I'm also on Ubuntu Server 11.10.
from nodemon.
Having the same issue.. latest ubuntu server. nodemon ignores outside of the root folder
from nodemon.
And the same on Win 7 x64 (node 0.8.16, nodemon 0.6.23) for me⦠Restarts only .js are changed in root.
from nodemon.
same issue on ubuntu 12.10, node v0.10.3, nodemon v0.7.6.
nodemon --watch lib --watch web web/app.js $1
from nodemon.
Hi, I appear to be having this same issue after upgrading Ubuntu to version 14.10.
I have nodemon 1.2.1 installed and it is restarting correctly when a file in the root folder is changed but anything in a subfolder is ignored.
I realise this issue is closed, would you like me to start a new issue for this or just leave it here?
from nodemon.
@remy @georgewilde can we re-open this and check it out?
from nodemon.
Please include full output with DEBUG=nodemon,nodemon:*
in your environment. Otherwise I have no information at all to debug with.
from nodemon.
@remy Same issue happens for me in Ubuntu 14.04.3 LTS, and nodemon v1.4.0
from nodemon.
If I include --ext scss
(obvious, this can be anything else) then I have it fired on subdirectory.
from nodemon.
got the same issue
--ext doesnt help
from nodemon.
It says it's watching in app/**/*
but doesn't restart when changes are made in files that are 2 levels deep.
> [email protected] start /home/faraaz/oss/going
> nodemon --watch app/ --exec ./bin/www
[nodemon] 1.18.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: /home/faraaz/oss/going/app/**/*
[nodemon] starting `./bin/www`
from nodemon.
Related Issues (20)
- Ability not to signal the whole subtree of a process HOT 14
- Restart not firing beyond deletion of directory under watch, when this directory structure is recreated (on Ubuntu 22.04) HOT 12
- Nodemon ignores `--ext` argument HOT 3
- not working with Node.js version 20.12.x HOT 12
- Unable to enable logs when using nodemon as a module HOT 6
- Document differences and/or provide migration guide to Node.js native watch mode HOT 1
- Restart app on specific exit code HOT 3
- Input input cyrillic char's in python input work not well HOT 2
- Nodemon Internal watch failed HOT 5
- nodemon does not restart the server ([nodemon] restarting due to changes...) HOT 4
- Question not a bug - How to restart app on crash HOT 2
- [CVE-2024-4068] Uncontrolled resource consumption found in braces (non-issue, see comments) HOT 3
- bash node env vars for readline HOT 3
- Problem with Newley released types HOT 28
- config.env should be overridden by runtime env variables HOT 1
- [CVE-2024-4068] Uncontrolled resource consumption found in braces - Question HOT 2
- When using nodemon to upload frontend files to the backend, password encryption on the backend fails to execute correctly because nodemon reloads the index.js file. HOT 1
- Number of restart events differs from the number of exec. HOT 4
- Advice, not a bug. HOT 4
- Nodemon restart process looks for tempfile.js~ and throws an error.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodemon.