Search code examples
visual-studio-2013gulphottowel

Visual Studio 2013 Gulp Task Runner nodemon


I'm looking at starting a new project using vs 2013, hottowel, and gulp. I've got the project created and can successfully run gulp serve-dev from the command line, this launches node and the browser

However if I use the Task Runner Explorer the output stops with

[time] Finished 'serve-dev' afer xx ms
[gulp] [nodemon] v1.3.7

an instance of node is started however if I browse to any of the ports in the config there is nothing there.

I'm very new to glup so I would appreciate any help.

edit: I've also just noticed that when I run gulp from the command line there are 2 node instances running, however when launching from Task Runner it only launches 1 node instance.


Solution

  • This took some delving, but I've found what was causing the issue...

    Within nodemon it uses process.stdin to allow restarting of the node server, the Visual Studio Task runner is a read-only window and must therefore not create the stdin pipe.

    Adding the following values to the nodemon options object tells nodemon to skip the restart option and therefore not try to listn on stdin.

        stdin: false,
        restartable: false