Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

157
Vistas
Babel Parse Error in EKS not Present when Built Locally

I am deploying a Docker Image to EKS and in doing so get a Babel parse error despite the build running without error on my local machine. Both build attempts use the same code and Dockerfile.

build   28-Jan-2022 14:06:57    > npm run clean && babel ./ --out-dir dist
build   28-Jan-2022 14:06:57    
build   28-Jan-2022 14:06:58    
build   28-Jan-2022 14:06:58    > ESGDA_API@1.0.0 clean /app
build   28-Jan-2022 14:06:58    > rm -rf ./dist && mkdir dist
build   28-Jan-2022 14:06:58    
build   28-Jan-2022 14:07:02    [91mSyntaxError: /app/.scannerwork/css- bundle/node_modules/@babel/core/src/config/files/index-browser.js: Unexpected token (3:12)
build   28-Jan-2022 14:07:02    
build   28-Jan-2022 14:07:02      1 | // @flow
build   28-Jan-2022 14:07:02      2 |
build   28-Jan-2022 14:07:02    > 3 | import type { Handler } from "gensync";             
build   28-Jan-2022 14:07:02        |             ^

My babel.config.json looks like so;

{
  "presets": [
    [
      "@babel/preset-env",
      {
        "targets": {
            "node": "current"
        },
        "include": ["@babel/plugin-transform-spread"]
      }
    ]
  ],
  "plugins": [
      "@babel/plugin-transform-spread"
  ],
  "ignore": [
    "node_modules"
  ]
}

My package.json file portion with Babel specs looks like so, including scripts;

"scripts": {
    "build": "npm run clean && babel ./ --out-dir dist",
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "nodemon --exec babel-node index.js",
    "clean": "rm -rf ./dist && mkdir dist",
    "clean-install": "rm -rf node_modules && rm package-lock.json && npm i"
  }

"devDependencies": {
    "@babel/cli": "^7.15.4",
    "@babel/core": "^7.15.5",
    "@babel/node": "^7.15.4",
    "@babel/preset-env": "^7.15.6"
  }

The Dockerfile up until the point of the error looks as follows;

FROM node:14.17.6-alpine AS base

WORKDIR /app

FROM base AS builder

COPY package*.json babel.config.json ./

RUN npm ci

COPY . .

RUN npm run build

I'm hoping to understand how the same code and Dockerfile could be erroring out in one environment but not the other. Any insight is much appreciated and please let me know what more information I can provide, thanks.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda