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

276
Vistas
Npm ignore dev dependency build errors looking for dev dependency

So I want to ignore dev dependency in my dockerfile by adding the RUN npm ci --only=production. However, when the build is ran, it's looking for some of the packages that were listed in my devDependencies in package.json file.

Turns out there are bunch of packages required by webpack.config file. See error below.

enter image description here

Why is it doing this when they are dev packages? Should I be moving these packages to dependencies instead? (When I move them the error goes away but surely that can't be the right thing to do)

This is what the section of my dockerfile looks like:

COPY package*.json .npmrc ./
RUN npm ci --only=production

COPY . .
RUN NODE_ENV=production npm run build 
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