Open togakangaroo opened 9 years ago
By the way I've looked at the codebase and tried doing this and it works just fine so it seems like the issue would be somewhere inside dirwatch code or it's binary
var exec = require('child_process').exec;
exec('npm run npmversion', function (err, stdout, stderr) {
if (err) console.error(err);
if (stdout) console.log(stdout.replace(/\n$/, ''));
if (stderr) console.warn(stderr.replace(/\n$/, ''));
});
I haven't tested this module on Windows at all, sadly. I'm fairly certain it's a Windows-specific issue as I've been using dirwatch with npm under Linux from the start.
The odd thing is that the last example you're giving is exactly what dirwatch is doing.
Could you try out something to help with debugging this problem? Open the node_modules/dirwatch/bin/dirwatch
file (it's JavaScript) and add console.log(">> CMD:", argv.cmd);
before line 31. Then try again and tell me what the output looks like.
I'm guessing something is going wrong while parsing the arguments.
Windows 8.1 node v0.10.32
I'm trying to play around with using npm as a build tool as hypothesized in this article.and am running into a problem when using dirwatch to launch npm.
I have the following scripts in my
package.json
Running this I get
Ok, that works great
Huh? npm not recognized? It should be on my PATH.
hmm, that contains
C:\Program Files\nodejs\
which is the location ofnpm.cmd
. So what's going on? Why can't I use npm?