There is a class definition missing from the botbuilder-streaming library that causes this error when building Botkit:
../../node_modules/botframework-streaming/lib/webSocket/browserWebSocket.d.ts(17,26): error TS2304: Cannot find name 'WebSocket'.
This currently blocks Botkit from building.
A fix for this is scheduled to be released next Monday.
Small update, the fix is in the 4.7 branch of botbuilder-js. We have not yet released 4.7.1 as there is another fix we might take for this patch release.
Could someone provide work around steps for this issue?
4.7.1 will hit npm any minute which should effectively resolve this.
@benbrown, @rpaddock, 4.7.1 is available on NPM.
I'm getting the following build errors after upgrade botkit and botbuilder-adapter-slack. Do I have the right version? My product is broken now and needs this update. Any help are appreciated. Thanks.
package.json
"botbuilder-adapter-slack": "^1.0.7",
"botkit": "^4.6.1",
Error when "npm run build"
node_modules/botframework-streaming/lib/subscribableStream.d.ts:15:5 - error TS2416: Property '_write' in type 'SubscribableStream' is not assignable to the same property in base type 'Duplex'.
Type '(chunk: any, encoding: string, callback: (error?: Error | null | undefined) => void) => void' is not assignable to type '(chunk: any, encoding: string, callback: (err?: Error | undefined) => void) => void'.
Types of parameters 'callback' 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'.
15 _write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void;
~~
node_modules/botframework-streaming/lib/webSocket/browserWebSocket.d.ts:17:26 - error TS2304: Cannot find name 'WebSocket'.
17 constructor(socket?: WebSocket);
~~~~~
Found 2 errors.
npm ls | findstr /is bot
+-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | | -- [email protected]
| | +-- [email protected]
| | | +-- [email protected] deduped
| | +-- [email protected]
| +-- [email protected] deduped
+-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | |-- [email protected] deduped
| | +-- [email protected] deduped
| | +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
@yingzhanguipath if you do a completely clean build (get rid of all your old node modules and reinstall), this should clear up since it it should grab the 4.7.1 botbuilder pacakges.
However I will also be releasing an update to botkit today that will enforce this.
I tried completely clean build (deleted node_modules and dist folder, then "npm install") several times. But, I'm still getting the same issue. Please advise.
Strange.
Well, the new build that pins everything to 4.7.1 will be out soon!
@benbrown Any update on 4.7.1?
It was published yesterday. This issue is resolved.
@yingzhanguipath the new botkit version is 4.6.2
Botkit version 4.6.2
node_modules/botframework-streaming/lib/subscribableStream.d.ts:15:5 - error TS2416: Property '_write' in type 'SubscribableStream' is not assignable to the same property in base type 'Duplex'.
Type '(chunk: any, encoding: string, callback: (error?: Error | null | undefined) => void) => void' is not assignable to type '(chunk: any, encoding: string, callback: (err?: Error | undefined) => void) => void'.
Types of parameters 'callback' 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'.
15 _write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void;
~I confirm I'm still seeing the issue on version "4.9.0" of botkit
botbuilder has version: "4.9.3"~
Same error code but different issue in fact.
Updating "@types/node" to version "14.0.26" fixed it.
Most helpful comment
A fix for this is scheduled to be released next Monday.