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

287
Views
Property 'end' in type 'GridFSBucketWriteStream' is not assignable to the same property in base type 'WritableStream'
node_modules/mongodb/mongodb.d.ts:3314:5 - error TS2416: Property 'end' in type 'GridFSBucketWriteStream' is not assignable to the same property in base type 'Writable'.
  Type '{ (): void; (chunk: Buffer): void; (callback: Callback<void | GridFSFile>): void; (chunk: Buffer, callback: Callback<void | GridFSFile>): void; (chunk: Buffer, encoding: BufferEncoding): void; (chunk: Buffer, encoding: BufferEncoding, callback: Callback<...>): void; }' is not assignable to type '{ (cb?: () => void): this; (chunk: any, cb?: () => void): this; (chunk: any, encoding: BufferEncoding, cb?: () => void): this; }'.

3314     end(chunk: Buffer, encoding: BufferEncoding | undefined, callback: Callback<GridFSFile | void>): void;
         ~~~

Earlier it was right, but when i added the feature to upload static files (images) to s3 bucket (using multer and multer-s3), I am getting this error on doing yarn dev to start the server which runs like this "dev": "NODE_ENV=dev nodemon -e ts --exec \"npm run compile\"",

My package.json scripts

"scripts": {
    "compile": "tsc && node build/index.js | pino-pretty",
    "dev": "NODE_ENV=dev nodemon -e ts --exec \"npm run compile\"",
    "start": "NODE_ENV=prod node build/index.js | pino-pretty",
    "lint": "eslint . --ext .ts"
},

Update: It works somehow with the start script but not with the dev script. Also, it has taken the "dev" powers from me :(

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Good news. This issue has since been resolved with mongodb version 4.3.0. (Here was the bug report: jira.mongodb.org/browse/NODE-3843)

over 4 years ago · Santiago Trujillo Report

0

My problem was solved with this question: Conversion 'GridFSBucketWriteStream' to type 'WritableStream' impossible?

Solution: Downgrade the @types/node to 16 as node 17 has breaking changes. Use npm i -D @types/node@16 or yarn add -D @types/node@16 to do so

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!