title: Error: EBUSY: resource busy or locked, rmdir
body: <p>The error occurs after following steps in windows:</p>
  
  <ol>
  <li>Open one terminal: <code>npm run start:dev</code></li>
  <li>Open another terminal: <code>ng build --watch</code></li>
  </ol>
  
  <p>However, it works in Mac by using the above commands. Part of the package.json configuration are:</p>
  
  <pre><code>"scripts": {
  "ng": "ng",
  "start:dev:prod": "ng build --prod &amp;&amp; cd dist/ &amp;&amp; node static/server.js",
  "start": "node static/server.js",
  "build:prod": "ng build --prod",
  "test": "ng test --code-coverage",
  "lint": "ng lint",
  "e2e": "ng e2e",
  "start:dev": "npm run build &amp; cd dist/ &amp; SET APP_ENV=dev &amp; node static/server.js",
  "build": "ng build"
  },
  </code></pre>
  
  <p>Error log:</p>
  
  <pre><code>Error: EBUSY: resource busy or locked, rmdir 'C:\AngularProject\dist'
  Error: EBUSY: resource busy or locked, rmdir 'C:\Spring-Intern-Projects\wdpr-accounting-reference-client\dist'
  at Object.rmdirSync (fs.js:701:3)
  </code></pre>