August 8th, 2022
3:43 pm
Posted under Knowledge Base & Windows & Windows 10 & Windows 11 & Windows 7
Permalink
Tags Gotcha, Tip
I created a simple batch file to run a number of npm build commands in succession.
However, the file exited after running the first npm command. This appears to be a side effect of the way npm runs – when you run npm, you actually end up running npm.cmd, which exits after completing. This is detailed on StackOverflow here.
A simple workaround as per the post is to prefix the npm commands with call – I did this and everything worked fine and all the builds were executed.
Comments Off on Batch file exits after running npm command