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 the server on files changes #252
Comments
Confirmed. Crap. On it. |
Got a fix in the works, just running tests across all platforms (which hopefully will be fine!) |
Fixed and in npm under nodemon@1.0.5 |
Updated to v1.0.5, but it still doesn't work:
Note: My command line is:
And the file is located in the folder this command is entered. |
Okay, so I can see from your config that the What Windows OS are you on? (I tested on XP...probably a little low!) and what version of node (I tested v0.10.23). |
Could you also try this and send me the output: var fs = require('fs'),
crypto = require('crypto'),
file = 'test' + crypto.randomBytes(16).toString('hex');
console.log('watching', file);
fs.writeFileSync(file, 'ok');
setTimeout(function () {
fs.watch(file, { persistent: false }, function (event, filename) {
console.log('fs.watch worked', filename);
});
}, 1000);
fs.watchFile(file, function (a, b) {
console.log('watchFile worked');
})
setTimeout(function () {
fs.writeFileSync(file, 'ok1');
}, 2000); Not with nodemon, just running as "node script.js". |
Hi, I also face this problem. I use Windows 8.1 (x64), Node 0.10.24. The output of this command for me is the following:
If I open the generated file and add something to it, then I get the same messages again. Thanks! |
Can you also include the output of On Sunday, January 5, 2014, gaborpro wrote:
— Remy |
I am working now, sadly don't have access to my home machine. In the evening I can check it. If it helps, I use the default config file which comes with npm. |
@remy lol, the gif was funny! :-) I'm on Here's the output of your script:
|
|
@alexilyaev that's great - cheers for the detail (and yep, I forgot that node version was in the dump!). It's weird because the simple test worked for you (to check watch support), yet the system.watchWorks config setting is false. Would you be able to join me in the #nodemon irc channel on freenode.net? I'd like to try out a few scripts to try to test and fix what's going on. I've just fired up my Windows 8 VM, and that's saying it's got |
(and now I've just revived my windows laptop, and even that is showing true for watchWorks, but clearly it's not flying for a few of you, so I'd like to sort it for you!). |
I have the same problem, i'll be glad to help if you need to try something |
Release going up shortly. |
Fixed confirmed using this script: https://gist.github.com/remy/8283715 |
Confirmed with |
Just a question, doing Git pull trigger these lines with
They don't trigger a restart, but I'm wondering why they are being ran if
Same thing for And another quick one, can I tell Nodemon to monitor only 1 or more files (e.g. |
On .git being listed in the trigger check - you're right, it should be ignored altogether based on what you've got in your ignore. It's somehow getting through the check (I'll test again this week and see if there's something I can do to suppress it. If you want it only restart on a single file ( {
"watch": ["server.js"]
} Now nodemon will only restart if |
Great, that worked. Looking at |
Thank you! |
@remy Btw, what was the difference between you're Win 8 VM and our setups? Meaning, why did it work for you in your tests but didn't work for us? |
I don't really know what the difference in the setup is (maybe because the But when I tested this evening, watchWorks was coming up as false, which is On 7 January 2014 22:18, Alex Ilyaev notifications@github.com wrote:
|
Hi @remy, I'm working on an API REST with typescript and I use nodemon to reload my server on each change. It works perfectly on unix systems but other collaborators have windows and it doesn't work. Do you have any idea what's going on? Thank you. |
Not with the information you've offered. Maybe get them using the windows On Fri, 18 Nov 2016, 22:26 raansilrey, notifications@github.com wrote:
|
I had a similar problem. I am running windows 10 and nodemon would not restart my web service when I made changes to the code. For whatever reason, node was installed in C:\Program Files (x86). Whenever, I would try to make an update, it complained I needed Administrative Privileges. I finally just moved the nodejs directory to the root of my c;\ drive. Everything works fine now whether using CMD line or PowerShell |
Same issue. Linux Mint 18, 64bit. Was trying to run a tiddlywiki server. Here is the Nodemon dump
|
For info; I had the same problem today with nodemon 1.11.0 and Node v7.10.0 . Fixed it by removing a |
Had the same issue, but I guess what caused it was, the script parent folder had a |
Using the -L (legacy option) worked for me in vagrant |
@iemadk Thank you for this, it was driving me crazy! |
Updated to v1.0.1 and then to v1.0.4 and I can't get the server restarted on file changes.
I'm changing and saving server.js and other js files in subfolders and nothing happens (server is not restarted, tested with actual page output as well).
The text was updated successfully, but these errors were encountered: