I am trying to use a batch file to quickly start my web app locally because there are many commands to run. I am using the following:
start "" /d "%~dp0client" npx webpack --watch
start "" /d "%~dp0client" npx live-server --entry-file=index.html
start "" /d "%~dp0server" npx nodemon index.js
It is correctly opening 3 windows. The first 2 are running correctly. But in the npx nodemon index.js
window, it errors and says "'webpack' is not recognized as an...". Even though the webpack command executes correctly in its window. So it seems like there is some residual stuff from the webpack command is somehow interfering with the nodemon command.
It doesn't show what commands each one actually ran, so I'm having a hard time figuring this out. Why are they interfering with each other? Did I get the syntax wrong?