Git Product home page Git Product logo

nodemon-bug-repro's Introduction

nodemon-bug-repro

Reproduces a bug with nodemon 2.0.0.

remy/nodemon#1633

The bug

When restarting a process, such as a node.js express server which has been started using the --exec option nodemon gets into an infite loop, waiting for subprocesses to finish. Reporting

[nodemon] still waiting for 2 subprocess(es) to finish...

continually in the console, interleaved with the normal messaging for restarting the process.

Running the following command and then making a change in index.js will demonstrate the problem.

npm install && npm run debug

The debug script in package.json runs nodemon with the --exec flag used to run npn run-script-start which in turn starts node index.js. (I originally noticed this issue using --exec to recompile a typescript project and then start the output with node.)

Running npm run watch in the same repro does not exhibit the behaviour, and nor does running the same command with nodemon pinned to v1.19.1.

The suspect

From the message and the versions I suspect this PR as having introduced the problem.

More Logs

 $ npm run debug

> [email protected] debug /home/josh/src/nodemon-bug-repro
> nodemon --exec 'npm run-script start'

[nodemon] 2.0.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching dir(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `npm run-script start`

> [email protected] start /home/josh/src/nodemon-bug-repro
> node ./index.js

Listening on port 4000!
[nodemon] restarting due to changes...
User defined signal 2
[nodemon] starting `npm run-script start`
[nodemon] still waiting for 2 subprocess(es) to finish...
[nodemon] still waiting for 2 subprocess(es) to finish...
[nodemon] still waiting for 2 subprocess(es) to finish...

> [email protected] start /home/josh/src/nodemon-bug-repro
> node ./index.js

[nodemon] still waiting for 2 subprocess(es) to finish...
[nodemon] still waiting for 2 subprocess(es) to finish...
Listening on port 4000!
[nodemon] still waiting for 2 subprocess(es) to finish...
[nodemon] still waiting for 2 subprocess(es) to finish...
[nodemon] still waiting for 2 subprocess(es) to finish...
[nodemon] still waiting for 2 subprocess(es) to finish...
[nodemon] still waiting for 2 subprocess(es) to finish...
[nodemon] still waiting for 2 subprocess(es) to finish...
[nodemon] still waiting for 2 subprocess(es) to finish...
[nodemon] still waiting for 2 subprocess(es) to finish...
[nodemon] still waiting for 2 subprocess(es) to finish...
[nodemon] still waiting for 2 subprocess(es) to finish...
[nodemon] still waiting for 2 subprocess(es) to finish...
[nodemon] still waiting for 2 subprocess(es) to finish...

nodemon-bug-repro's People

Contributors

dependabot[bot] avatar jaybeeuu avatar

Watchers

 avatar

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.