0

I have to do npm install in multiple folder (around 16 folders) , So I thought of writing a batch script which will do the same thing in one click. So that it will help other developers while setting up the project.

Here is the first part of the script.

echo STEP12
pushd HDC
git config --global url."https://".insteadOf git://

echo STEP13
pushd hui-components-style
npm install --registry http://localhost:23510 && popd
pushd hui-components-dfp
npm install --registry http://localhost:23510

But after the first popd its not going inside the hui-components-dfp folder and executing the npm install. I am new to writing batch file. May be I am doing some silly mistake. Please help.

Deepak Kumar Padhy
  • 4,128
  • 6
  • 43
  • 79
  • is there a particular reason why you chain `npm` command and `popd`? can you `echo %CD%` at each line? and post the trace of execution? – Jean-François Fabre Jul 31 '16 at 18:24
  • as said in the exact duplicate of your question by .. yourself, npm is a batch file, you have to use the `call` prefix. http://stackoverflow.com/questions/38676130/change-directory-command-cd-not-working-in-batch-file-after-npm-install – Jean-François Fabre Jul 31 '16 at 18:26

0 Answers0