вот мой dockerfile
FROM node:14-slim
WORKDIR /class_attender
ENV NODE_ENV production
COPY package.json /class_attender/package.json
RUN npm install --production
COPY .env /class_attender/.env
COPY . /class_attender
CMD ["npm","start"]
EXPOSE 8080
вот .env
BASE_URL=http://localhost:8080
MONGODB_URI=mongodb://localhost:27017/test1
SESSION_SECRET=Your Session Secret goes her
OPENSHIFT_NODEJS_PORT=8080
когда питаюсь розвернуть docker контейнер то выдает
Error: Cannot find module 'morgan'
Require stack:
- /class_attender/app.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
at Function.Module._load (internal/modules/cjs/loader.js:730:27)
at Module.require (internal/modules/cjs/loader.js:957:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/class_attender/app.js:5:16)
at Module._compile (internal/modules/cjs/loader.js:1068:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:933:32)
at Function.Module._load (internal/modules/cjs/loader.js:774:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/class_attender/app.js' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! class-attender@1.0.0 start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the class-attender@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Что я делаю не так? Node.js вроде должен игнорировать dev dependecies?