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

206
Views
Webpack Error when `yarn run build` ran in my docker build

This is the error that occurred upon running my build:

WARNING in configuration
#12 0.535 The 'mode' option has not been set, webpack will fallback to 'production' for this value.
#12 0.535 Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
#12 0.535 You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/
#12 0.535 
#12 0.535 ERROR in main
#12 0.535 Module not found: Error: Can't resolve './src' in '/src'
#12 0.535 resolve './src' in '/src'
#12 0.535   using description file: /src/package.json (relative path: .)
#12 0.535     Field 'browser' doesn't contain a valid alias configuration
#12 0.535     using description file: /src/package.json (relative path: ./src)
#12 0.535       no extension
#12 0.535         Field 'browser' doesn't contain a valid alias configuration
#12 0.535         /src/src doesn't exist
#12 0.535       .js
#12 0.535         Field 'browser' doesn't contain a valid alias configuration
#12 0.535         /src/src.js doesn't exist
#12 0.535       .json
#12 0.535         Field 'browser' doesn't contain a valid alias configuration
#12 0.535         /src/src.json doesn't exist
#12 0.535       .wasm
#12 0.535         Field 'browser' doesn't contain a valid alias configuration
#12 0.535         /src/src.wasm doesn't exist
#12 0.535       as directory
#12 0.535         /src/src doesn't exist


This is my Dockerfile:

FROM node:12.10

 
WORKDIR /src

COPY package.json package.json
COPY yarn.lock yarn.lock

#Note the dependency install
RUN apt-get update && \
 apt-get -y install libcairo2-dev \
 libpango1.0-dev \
 libjpeg-dev \
 libgif-dev \
 librsvg2-dev

RUN yarn install
RUN yarn run build

EXPOSE 3000

COPY . . 

CMD ["node", "./server"]

You can find a copy of my webpack.config.js here.

I'm not sure if my webpack configuration is correct or if the source of the error lies in my Dockerfile. I look forward to your insight. Any help is greatly appreciated, thank you.

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!