Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

284
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda