title: Docker build cannot find javascript modules (Docker/Nodejs/Express)
body: <p>I'm building Express using Docker.</p>
  <p>Previously, I uploaded it to the Ubuntu server using the Dockerfile.
  But suddenly there was an error.
  When building Docker Image, there was an error that could not read the file.
  When I build with Docker and run, It can't find the javascript module I made.</p>
  <p>An error occurred even if dockerfile2 was used instead of dockerfile1.</p>
  <p>I don't know what the problem is.</p>
  <p>I updated Docker, too.</p>
  <p><code>Docker version 20.10.8,</code></p>
  <hr />
  <p><strong>Error Msg</strong>.<br />
  (when use dockerfile1)
  <a href="https://i.stack.imgur.com/dNXYc.png" rel="nofollow noreferrer">Error msg : Cannot find module </a></p>
  <p><strong>Error Msg</strong>.<br />
  (when use dockerfile2)</p>
  <pre><code>&gt; socket_example@1.0.0 start /usr/src/app
  &gt; node app.js
  
  internal/modules/cjs/loader.js:905
    throw err;
    ^
  
  Error: Cannot find module './AgoraApi'
  Require stack:
  - /usr/src/app/src/audioChat/audioChannelHandler.js
  - /usr/src/app/src/multiplay/rooms/GameRoom.js
  - /usr/src/app/app.js
  </code></pre>
  <p><strong>docker file1</strong></p>
  <pre><code>FROM node:14
  WORKDIR /
  COPY  package.json ./
  RUN  npm install
  COPY  ./ ./
  EXPOSE 4000
  CMD [ &quot;npm&quot;, &quot;start&quot; ]
  </code></pre>
  <p><strong>docker file2</strong></p>
  <pre><code>FROM node:14
  WORKDIR /usr/src/app
  COPY  package.json /usr/src/app
  RUN  npm install
  COPY  . /usr/src/app
  EXPOSE 4000
  CMD [ &quot;npm&quot;, &quot;start&quot; ]
  </code></pre>
  <p><strong>dockerignore file</strong></p>
  <pre><code>.git
  .gitignore
  
  README.md
  webpack.config.js
  NAF-Gallery-Test.git
  package-lock.json
  backup
  logs
  
  node_modules
  config/sql/*
  
  !src
  !util
  </code></pre>
  <p><strong>Folder Structure</strong></p>
  <pre><code>app.js
  config.js
  src
  ㄴaudioChat
   ㄴagoraApi.js
  util
  ㄴvipRoomManager.js
  ...
  </code></pre>