title: NPM / Error: EACCES: permission denied, scandir
body: <p>when i type &quot;npm run build:prod&quot;</p>
  <pre><code>build:prod
      npm run build -- --configuration production --aot --optimization=false
  </code></pre>
  <p>i get this error :</p>
  <pre><code>&gt; fancy-name@0.0.0 build:prod
  &gt; npm run build -- --configuration production --aot --optimization=false
  
  glob error [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] {
   errno: -13,
   code: 'EACCES',
   syscall: 'scandir',
   path: '/root/.npm/_logs'
  }
  npm WARN logfile Error: EACCES: permission denied, scandir '/root/.npm/_logs'
  npm WARN logfile  error cleaning log files [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] {
  npm WARN logfile   errno: -13,
  npm WARN logfile   code: 'EACCES',
  npm WARN logfile   syscall: 'scandir',
  npm WARN logfile   path: '/root/.npm/_logs'
  npm WARN logfile }
  ⸨⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⸩ ⠙ : WARN logfile Error: EACCES: permission denied, scandir '/root/.npm/_logs'
  &gt; fancy-name@0.0.0 build
  &gt; ng build &quot;--configuration&quot; &quot;production&quot; &quot;--aot&quot; &quot;--optimization=false&quot;
  
  Node.js version v17.4.0 detected.file Error: EACCES: permission denied, scandir '/root/.npm/_logs'
  Odd numbered Node.js versions will not enter LTS status and should not be used for production. For more information, please see https://nodejs.org/en/about/releases/.
  This version of CLI is only compatible with Angular versions ^13.0.0-next || &gt;=13.0.0 &lt;14.0.0,ogs'
  but Angular version 12.1.3 was found instead.
  
  Please visit the link below to find instructions on how to update Angular.
  https://update.angular.io/
  </code></pre>
  <p>i already try to delete node_module &amp; package.json and run <code>NPM install</code> again, but it didnt work
  (Linux 4.19.0-16-cloud-amd64)</p>
  <p>EDIT : solved with <code>chown -R root /path/of/your/project</code></p>