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 :(