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

275
Views
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
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!