Skip to content
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 passing -L to node #639

Closed
immensenet opened this issue Sep 18, 2015 · 1 comment · Fixed by #640
Closed

nodemon passing -L to node #639

immensenet opened this issue Sep 18, 2015 · 1 comment · Fixed by #640

Comments

@immensenet
Copy link

I'm trying to get nodemon to detect changes inside a docker container (Mac OSX Yosemite with Docker-machine) with mounted volume

My index.js file:

root@4140f1d30a5d:/src/app# cat app.js
root@4140f1d30a5d:/src/app# cat index.js
var app = require('http').createServer(handler)
var fs = require('fs');

app.listen(process.env.PORT || 4000);
console.log("Listening on: "+ (process.env.PORT || 4000));

function handler (req, res) {
  fs.readFile(__dirname + '/index.html',
  function (err, data) {
    if (err) {
      res.writeHead(500);
      return res.end('Error loading index.html');
    }

    res.writeHead(200);
    res.end(data);
  });
}

Starting nodemon:

root@4140f1d30a5d:/src/app# nodemon -V index.js
18 Sep 23:53:06 - [nodemon] v1.5.1
18 Sep 23:53:06 - [nodemon] reading config /src/app/nodemon.json
18 Sep 23:53:06 - [nodemon] to restart at any time, enter `rs`
18 Sep 23:53:06 - [nodemon] ignoring: .git /src/app/node_modules/**/* bower_components .sass-cache
18 Sep 23:53:06 - [nodemon] watching: *.*
18 Sep 23:53:06 - [nodemon] watching extensions: js,json,hjs
18 Sep 23:53:06 - [nodemon] starting `node index.js`
18 Sep 23:53:06 - [nodemon] child pid: 237
18 Sep 23:53:06 - [nodemon] watching 6 files
Listening on: 4000

Now I change the error message in index.js

return res.end('Error loading root');

And nodemon did not restart. So I was trying to use the -L argument

root@4140f1d30a5d:/src/app# nodemon -L -V index.js
18 Sep 23:56:04 - [nodemon] v1.5.1
18 Sep 23:56:04 - [nodemon] reading config /src/app/nodemon.json
18 Sep 23:56:04 - [nodemon] to restart at any time, enter `rs`
18 Sep 23:56:04 - [nodemon] ignoring: .git /src/app/node_modules/**/* bower_components .sass-cache
18 Sep 23:56:04 - [nodemon] watching: *.*
18 Sep 23:56:04 - [nodemon] watching extensions: js,json,hjs
18 Sep 23:56:04 - [nodemon] starting `node -L index.js`
18 Sep 23:56:04 - [nodemon] child pid: 265
node: bad option: -L
18 Sep 23:56:04 - [nodemon] app crashed - waiting for file changes before starting...
18 Sep 23:56:04 - [nodemon] watching 6 files

Which started node as node -L index.js.

Am I doing something wrong or is this a bug?

@remy
Copy link
Owner

remy commented Sep 19, 2015

-L was dropped, but will be reintroduced (to force polling) in #633.

I'm working on it right now :)

remy added a commit that referenced this issue Sep 19, 2015
Pass the `usePolling` flag to Chokidar when in legacy mode, which is supposed to/hopefully fix containers watching network attached drives.

Fixes #639
Fixes #633
@remy remy closed this as completed in #640 Sep 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants