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

714
Views
Mongoose error: Property 'Buffer' does not exist on type 'typeof globalThis'

I am facing an issue that the mongoose returns an error likes node_modules/mongoose/index.d.ts:1867:33 - error TS2339: Property 'Buffer' does not exist on type 'typeof globalThis'.

My NestJS is running properly under my development machine with below specification

Node version: v14.17.3

Base image when packaging docker image

Node version: v14.17.1

package.json

{
  "dependencies": {
    
  },
  "devDependencies": {
    "@nestjs/common": "^7.0.0",
    "@nestjs/mongoose": "^7.2.4",
    "mongoose": "^5.12.1"
  }
}

I found a few solution like adding @types/node but it does not work in my case.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Go to package.json file. Change @types/node: "^16.0.0" to @types/node: "^15.6.1" and save it.

Then run npm install !!

over 4 years ago · Santiago Trujillo Report
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!