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

1.3K
Views
Docker run fails "return process.dlopen(module, path.toNamespacedPath(filename));"

im trying to make a dockerfile and run my code into this container. im getting following error:

node:internal/modules/cjs/loader:1187
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: /node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node: invalid ELF header
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1187:18)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/node_modules/bcrypt/bcrypt.js:6:16)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
  code: 'ERR_DLOPEN_FAILED'
}

My application works fine without docker. i also tryed to remove bcrypt like in this question: Node - was compiled against a different Node.js version using NODE_MODULE_VERSION 51

dockerfile:

FROM node:16
WORKDIR ./
COPY package*.json ./
RUN npm install 
COPY . .
EXPOSE 4000
CMD ["node", "server.js"]

.dockerignore:

node_modules
upload
export
converage
.git
.tmp
.vscode
.github
.env
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!