title: EACCES: permission denied, open '/usr/local/lib/node_modules/npm/bin/npm-cli.js'
body: <p>Hello sir i am new to docker, i am using ubuntu budgie(linux) 20.04 my docker version is 
  <code>Docker version 18.09.9, build 1752eb3</code>
  i have install docker using snap package manager and the path is like this
  <code>/snap/bin/docker.machine /snap/bin/docker.compose /snap/bin/docker /snap/bin/docker.help</code>
  I have install nodejs and npm in my host machine form this link
  <a href="https://websiteforstudents.com/how-to-install-node-js-10-11-12-on-ubuntu-16-04-18-04-via-apt-and-snap/" rel="nofollow noreferrer">nodejs install link</a>
  I am learning docker by making a single nodejs express app with docker. Here is my Dockerfile</p>
  
  <pre><code>FROM node:lts
  USER node
  ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
  ENV PATH=$PATH:/home/node/.npm-global/bin
  WORKDIR /home/node
  COPY package.json .
  RUN npm install
  COPY . .
  CMD ['npm', 'start']
  </code></pre>
  
  <p>here is my app.js file</p>
  
  <pre><code>const express = require('express');
  const app = express()
  
  app.get('/', (req, res) =&gt; {
    res.send('hello world')
  })
  
  app.listen(3000, () =&gt; {
    console.log('app is renning at 3000');
  })
  
  </code></pre>
  
  <p><strong>When i start to build an image from this dockerfile i get this error</strong></p>
  
  <pre><code>internal/fs/utils.js:230
      throw err;
      ^
  
  Error: EACCES: permission denied, open '/usr/local/lib/node_modules/npm/bin/npm-cli.js'
      at Object.openSync (fs.js:458:3)
      at Object.readFileSync (fs.js:360:35)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:1152:22)
      at Module.load (internal/modules/cjs/loader.js:977:32)
      at Function.Module._load (internal/modules/cjs/loader.js:877:14)
      at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
      at internal/main/run_main_module.js:18:47 {
    errno: -13,
    syscall: 'open',
    code: 'EACCES',
    path: '/usr/local/lib/node_modules/npm/bin/npm-cli.js'
  }
  The command '/bin/sh -c npm install --only=prod' returned a non-zero code: 1
  
  </code></pre>
  
  <p>Please tell me how can i fix this. 
  Thanks.</p>