Code Monkey home page Code Monkey logo

Comments (7)

remy avatar remy commented on May 22, 2024

Can you confirm that the account you run nodemon under is the same and has the permissions as that one that you're uploading with FTP?

from nodemon.

senior-php-developer avatar senior-php-developer commented on May 22, 2024

I've set permissions to file 777
it still restarts each time

On 8/22/2011 3:43 PM, remy wrote:

Can you confirm that the account you run nodemon under is the same and has the permissions as that one that you're uploading with FTP?

from nodemon.

MartinodF avatar MartinodF commented on May 22, 2024

I'm having the same problem (node v0.6.5). Editing files remotely via SFTP (but I don't think that matters), and whenever I change the first file nodemon just keeps restarting the app. File permissions are correct.

I was able to fix it by changing nodemon to write a single character 'a' to the flag file instead of an empty string ''. Reading node's source code, this behavior seems to be correct (or maybe I don't understand how nodemon is supposed to work). fs.writeSync() contains the following line:

if (!length) return 0;

So if the write buffer length is zero, the file isn't touched at all.

Maybe you could consider using fs.utimesSync(), introduced in node v0.5.0, and falling back on exec('touch ...') if that's not available?

from nodemon.

remy avatar remy commented on May 22, 2024

@MartinodF that totally makes sense - but I'd rather not use touch to try to start thinking about adding decent windows support. I think the quickest and simplest fix is just to insert a character as you suggested. Watch this space (hopefully not too much longer - sorry!)

from nodemon.

remy avatar remy commented on May 22, 2024

I've now removed the dependancy on the .monitor file altogether in the latest release. Please could you update and test? Should be all good now (finally!)

from nodemon.

MartinodF avatar MartinodF commented on May 22, 2024

Works perfectly! Great work, thanks

from nodemon.

remy avatar remy commented on May 22, 2024

@MartinodF Pleased to hear :)

from nodemon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.