title: Angular-CLI ng new: "Error: EPERM: operation not permitted..."
body: <p>I am trying to use Angular-CLI to install a new Angular2 app, but keep running into the following issue:</p>
  
  <p><code>ng new payment-calc-app</code></p>
  
  <p>After "Installing packages for tooling via npm", I get the following Error codes:</p>
  
  <pre><code>npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
  npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
  npm ERR! path C:\Users\jweston\Documents\Apps\payment-calc-app\node_modules\.staging\rxjs-ccea9159
  npm ERR! code EPERM
  npm ERR! errno -4048
  npm ERR! syscall rename
  npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\jweston\Documents\Apps\payment-calc-app\node_modules\.staging\rxjs-ccea9159' -&gt; 'C:\Users\jweston\Documents\Apps\payment-calc-app\node_modules\rxjs'
  npm ERR!     at destStatted (C:\Users\jweston\AppData\Roaming\npm\node_modules\npm\lib\install\action\finalize.js:29:7)
  npm ERR!     at C:\Users\jweston\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
  npm ERR!     at FSReqWrap.oncomplete (fs.js:123:15)
  npm ERR!
  npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\jweston\Documents\Apps\payment-calc-app\node_modules\.staging\rxjs-ccea9159' -&gt; 'C:\Users\jweston\Documents\Apps\payment-calc-app\node_modules\rxjs'
  npm ERR!     at Error (native)
  npm ERR!  { Error: EPERM: operation not permitted, rename 'C:\Users\jweston\Documents\Apps\payment-calc-app\node_modules\.staging\rxjs-ccea9159' -&gt; 'C:\Users\jweston\Documents\Apps\payment-calc-app\node_modules\rxjs'
  npm ERR!     at destStatted (C:\Users\jweston\AppData\Roaming\npm\node_modules\npm\lib\install\action\finalize.js:29:7)
  npm ERR!     at C:\Users\jweston\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
  npm ERR!     at FSReqWrap.oncomplete (fs.js:123:15)
  npm ERR!
  npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\jweston\Documents\Apps\payment-calc-app\node_modules\.staging\rxjs-ccea9159' -&gt; 'C:\Users\jweston\Documents\Apps\payment-calc-app\node_modules\rxjs'
  npm ERR!     at Error (native) parent: 'payment-calc-app' }
  npm ERR!
  npm ERR! Please try running this command again as root/Administrator.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     C:\Users\jweston\AppData\Roaming\npm-cache\_logs\2017-03-23T19_17_36_190Z-debug.log
  
  Package install failed, see above.
  </code></pre>
  
  <p>I've tried <code>npm clean cache</code> and running Command Prompt as an Administrator (I'm on Windows) to no avail. </p>
  
  <p>Oddly enough, when I go to try to delete the folders that the failed installation created, Windows prevents me from deleting them, saying I need to be an Administrator to delete them, even though I am an administrator. I need to go into each individual folder and delete each individual file one at a time.</p>