title: Cannot find module rimraf in docker container
body: <p>When i try to run my node project which uses rimraf, in a docker container, I get the error that module rimraf cannot be found. It is installed and can be found in my package.json. If i run my app locally, everything works fine.
  Error log:</p>
  
  <pre><code>Error: Cannot find module 'rimraf'
  node_1     |     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:571:15)
  node_1     |     at Function.Module._load (internal/modules/cjs/loader.js:497:25)
  node_1     |     at Module.require (internal/modules/cjs/loader.js:626:17)
  node_1     |     at require (internal/modules/cjs/helpers.js:20:18)
  node_1     |     at Object.&lt;anonymous&gt; (/usr/src/app/controllers/products.js:5:16)
  node_1     |     at Module._compile (internal/modules/cjs/loader.js:678:30)
  node_1     |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
  node_1     |     at Module.load (internal/modules/cjs/loader.js:589:32)
  node_1     |     at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
  node_1     |     at Function.Module._load (internal/modules/cjs/loader.js:520:3)
  node_1     |     at Module.require (internal/modules/cjs/loader.js:626:17)
  node_1     |     at require (internal/modules/cjs/helpers.js:20:18)
  node_1     |     at Object.&lt;anonymous&gt; (/usr/src/app/expressRoutes/productRoutes.js:6:26)
  node_1     |     at Module._compile (internal/modules/cjs/loader.js:678:30)
  node_1     |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
  node_1     |     at Module.load (internal/modules/cjs/loader.js:589:32)
  </code></pre>
  
  <p>my dockerfile:</p>
  
  <pre><code>    FROM node
  
      # Create a directory where our app will be placed
      RUN mkdir -p /usr/src/app
  
      # Change directory so that our commands run inside this new directory
      WORKDIR /usr/src/app
  
      # Copy dependency definitions
      COPY package.json /usr/src/app
  
      # Install dependecies
      RUN npm install
  
      # Get all the code needed to run the app
      COPY . /usr/src/app
  
      # Expose the port the app runs in
      EXPOSE 4000
  
      # Serve the app
      CMD ["npm", "start"]
  </code></pre>
  
  <p>Any help/suggestions why this happens?
  Github link: <a href="https://github.com/isaacs/rimraf/issues/171" rel="nofollow noreferrer">https://github.com/isaacs/rimraf/issues/171</a></p>
  
  <p>My docker-compose.yml as asked.</p>
  
  <pre><code>version: '2'
  
    services:
      node:
              image: some-private-repo/node_application:latest
              ports:
              - "4000:4000"
              links:
              - mongo
              environment:
              - MONGO_URL=mongodb://mongo:27017/mydb
              networks:
              - network
              depends_on:
              - mongo
      mongo:
              image: mongo:latest
              ports:
              - "27017:27017"
              networks:
              - network
  </code></pre>
  
  <p>networks:
          network:
                  driver: bridge</p>