remy / nodemon

Monitor for any changes in your node.js application and automatically restart the server - perfect for development
http://nodemon.io/
MIT License
26.21k stars 1.72k forks source link

nodemon spawns new windows on Windows 10 #2099

Closed lerarosalene closed 1 year ago

lerarosalene commented 1 year ago

More info:

If pm2 is spawned via windows console, and if it starts nodemon binary as it's app (with ecosystem file configured as such)

const wdsPackage = require('webpack-dev-server/package.json');
const wdsBin = require.resolve(`webpack-dev-server/${wdsPackage.bin}`);

const nodemonPkg = require('nodemon/package.json');
const nodemonBin = require.resolve(`nodemon/${nodemonPkg.bin.nodemon ?? nodemonPkg.bin}`);

module.exports = {
  apps : [{
    script: nodemonBin,
    name: 'my-cool-app-name',
    cwd: '.',
    args: `--watch webpack.config.js --watch package.json "${wdsBin}"`
  }],
};

it then spawns window with shell of webpack-dev-server.

Expected behaviour

No windows spawned

Actual behaviour

image

Steps to reproduce

Install pm2 globally, init project, install nodemon there, make ecosystem.config.js with given config (you can replace webpack-dev-server with any node script which runs indefinetely). Run pm2 start ecosystem.config.js and enjoy new console window.


If applicable, please append the --dump flag on your command and include the output here ensuring to remove any sensitive/personal details or tokens.

lerarosalene commented 1 year ago

PR that should get rid of this: https://github.com/remy/nodemon/pull/2098

github-actions[bot] commented 1 year ago

This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. Thank you for contributing <3

github-actions[bot] commented 1 year ago

Automatically closing this issue due to lack of activity