title: Getting permission error while trying to install @angular/cli
body: <p>I am to install @angular/cli on my Ubuntu 16.04 computer. My node version is
  v7.10.0 and npm is 5.0.0</p>
  
  <p>I keep getting this error:</p>
  
  <pre><code>gyp ERR! configure error 
  gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@angular/cli/node_modules/node-sass/build'
  gyp ERR! System Linux 4.10.0-21-generic
  gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/@angular/cli/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
  gyp ERR! cwd /usr/local/lib/node_modules/@angular/cli/node_modules/node-sass
  gyp ERR! node -v v7.10.0
  gyp ERR! node-gyp -v v3.6.1
  gyp ERR! not ok 
  Build failed with error code: 1
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.5.3 (node_modules/@angular/cli/node_modules/node-sass):
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.5.3 postinstall: `node scripts/build.js`
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
  </code></pre>
  
  <p>I also tried the following commands:</p>
  
  <pre><code>npm cache clean --force
  sudo npm install -g @angular/cli
  </code></pre>
  
  <p>Should I manually try and change the permission or ownership using <strong>chmod</strong> or <strong>chown</strong>?</p>