Property ‘_write’ in type ‘ClientDuplexStreamImpl<RequestType, ResponseType>’ is not assignable to the same property in base type ‘Duplex’.

Fredric Cliver
1 min readSep 21, 2020

--

node_modules/@google-cloud/pubsub/node_modules/@grpc/grpc-js/build/src/call.d.ts:79:5 - error TS2416: Property '_write' in type 'ClientDuplexStreamImpl<RequestType, ResponseType>' is not assignable to the same property in base type 'Duplex'.
Type '(chunk: RequestType, encoding: string, cb: WriteCallback) => void' is not assignable to type '(chunk: any, encoding: string, callback: (err?: Error | undefined) => void) => void'.
Types of parameters 'cb' and 'callback' are incompatible.
Types of parameters 'err' and 'error' are incompatible.
Type 'Error | null | undefined' is not assignable to type 'Error | undefined'.
Type 'null' is not assignable to type 'Error | undefined'.

_write(chunk: RequestType, encoding: string, cb: WriteCallback): void;

Solution

execute this command under the ‘/functions’ directory (If you’re in firebase dev env)

$ npm i @types/node -D

--

--

Fredric Cliver
Fredric Cliver

Written by Fredric Cliver

13+ years in the digital trenches. I decode complex tech concepts into actionable insights, focusing on AI, Software Engineering, and emerging technologies.

No responses yet