Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

508
Views
Dockerfile: no se puede encontrar el módulo '/usr/src/app/dist/main' - La carpeta Dist no existe en el contenedor

Tengo el siguiente error al intentar ejecutar mi aplicación NestJS con Docker :

 > svc-metrics@0.0.1 start:prod > node dist/main node:internal/modules/cjs/loader:936 throw err; ^ Error: Cannot find module '/usr/src/app/dist/main' at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) at Function.Module._load (node:internal/modules/cjs/loader:778:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) at node:internal/main/run_main_module:17:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }

Este es mi Dockerfile

 FROM node:16.14.2 as production ENV NODE_ENV=production WORKDIR /usr/src/app COPY package*.json ./ COPY tsconfig.build.json ./ COPY tsconfig.json ./ RUN npm i -g @nestjs/cli RUN npm i --save-dev @types/node RUN npm install RUN npm run build COPY . . #RUN ls #dist folder does not exists here CMD ["node", "dist/main"]

Sin embargo, si ejecuto RUN ls , la carpeta dist no existe y el node dist/main no funcionará.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!