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

488
Views
AWS Elastic Beanstalk Docker Node Typescript Punto de entrada no encontrado

Tengo una instancia de EBS con Platform Docker running on 64bit Amazon Linux/2.16.5

Tengo una aplicación mecanografiada de nodejs que, cuando se carga, debe compilarse y luego ejecutarse.

Recibo este error en /var/log/eb-docker/containers/eb-current-app/unexpected-quit.log después de descargar los registros completos.

 Docker container quit unexpectedly on Thu Mar 11 02:12:43 UTC 2021: > mybackend@1.0.0 start /usr/src/app > node ./dist/server.js internal/modules/cjs/loader.js:883 throw err; ^ Error: Cannot find module '/usr/src/app/dist/server.js' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15) at Function.Module._load (internal/modules/cjs/loader.js:725:27) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) at internal/main/run_main_module.js:17:47 { code: 'MODULE_NOT_FOUND', requireStack: [] } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! mybackend@1.0.0 start: `node ./dist/server.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the mybackend@1.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-03-11T02_12_39_040Z-debug.log

Dockerfile

 FROM node:14-alpine WORKDIR /usr/src/app COPY package*.json ./ RUN npm install COPY tsconfig*.json ./ COPY src src RUN npm run build ENV NODE_ENV=ebs ENV PORT=8080 ENV HOST=0.0.0.0 EXPOSE 8080 ENTRYPOINT ["npm", "start"]

scripts de paquete.json

 "scripts": { "start": "node ./dist/server.js", "build": "tsc", "dev": "nodemon", "test": "jest --watch" },

tsconfig.json

 { "compilerOptions": { "module": "commonjs", "outDir": "dist", "sourceMap": true, "strict": true, "target": "es2017", "allowSyntheticDefaultImports": true, "noImplicitAny": false }, "compileOnSave": true, "include": [ "src/", ] }

Esto funciona bien localmente en mi máquina ubuntu usando docker. Solo falla en la instancia de ebs.

over 4 years ago · Santiago Trujillo
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!