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

Windows Incompatible #1

Open
amcdnl opened this issue Mar 22, 2016 · 1 comment
Open

Windows Incompatible #1

amcdnl opened this issue Mar 22, 2016 · 1 comment

Comments

@amcdnl
Copy link

amcdnl commented Mar 22, 2016

Everytime I try to run, I get the following:

STARTING FROM C:\dev\myapp\Web\conf\nginx.conf
fs.js:1315
    throw error;
    ^

Error: watch /run ENOENT
  at exports._errnoException (util.js:890:11)
  at FSWatcher.start (fs.js:1313:19)
  at Object.fs.watch (fs.js:1341:11)
  at ReadFileContext.callback (C:\dev\myapp\Web\node_modules\nginx-o\lib\Lifecycle.js:32:23)
  at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:324:13)

my setup looks like this:

gulp.task('start:web', function(done){

  var path = require('path');
  var dir = path.resolve(__dirname, '../', 'conf/nginx.conf');

  console.log('STARTING FROM', dir)

  var nginx = new Nginx({
    confDir: dir
  });

  nginx.on('started', function () { 
    console.log('nginx has started'); 
    done();
  });

  nginx.on('stopped', function () { console.log('nginx has stopped'); });
});

I'm running on windows 10, starting manually works fine.

@amcdnl
Copy link
Author

amcdnl commented Mar 22, 2016

Setting it up like:

gulp.task('start:web', function(done){
  var nginx = new Nginx({
    //sudo: true,
    pidFile: path.resolve(__dirname, '../', 'conf/nginx.pid'),
    confDir: path.resolve(__dirname, '../', 'conf/nginx.conf')
  });

  nginx.on('started', function () { 
    console.log('nginx has started'); 
    done();
  });
  nginx.on('stopped', function () { console.log('nginx has stopped'); });
});

fixed that problem, however, this doesn't work on windows because of the which command here: https://github.com/muhammaddadu/nginx-o/blob/master/lib/Nginx.js#L28

@amcdnl amcdnl changed the title Errors running from gulp on windows Windows Incompatible Mar 22, 2016
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

No branches or pull requests

1 participant