You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
because the last version of @slack/bolt is using @slack/web-apiv6 so the app failed to build.
Error was the following:
src/listeners/messages/bot-message.ts:43:79 - error TS2345: Argument of type 'import("/home/rom1/Projects/ai-project-team/slack/node_modules/@slack/bolt/node_modules/@slack/web-api/dist/WebClient").WebClient' is not assignable to parameter of type 'import("/home/rom1/Projects/ai-project-team/slack/node_modules/@slack/web-api/dist/WebClient").WebClient'.
Property 'functions' is missing in type 'import("/home/rom1/Projects/ai-project-team/slack/node_modules/@slack/bolt/node_modules/@slack/web-api/dist/WebClient").WebClient' but required in type 'import("/home/rom1/Projects/ai-project-team/slack/node_modules/@slack/web-api/dist/WebClient").WebClient'.
43 if (!threadId) updateChannelPurposeWithThreadId(purpose, thread!.id!, client, genericMessage.channel);
~~~~~~
node_modules/@slack/web-api/dist/methods.d.ts:1008:14
1008 readonly functions: {
~~~~~~~~~
'functions' is declared here.
In node_modules/@slack/bolt/dist/types/middleware.d.ts, WebClient is defined as import { WebClient } from '@slack/web-api';
The text was updated successfully, but these errors were encountered:
filmaj
added
question
M-T: User needs support to use the project
needs info
An issue that is claimed to be a bug and hasn't been reproduced, or otherwise needs more info
and removed
untriaged
needs info
An issue that is claimed to be a bug and hasn't been reproduced, or otherwise needs more info
labels
Jan 20, 2024
Yes, in bolt we intentionally are keeping web-api to v6 within the bolt v3 line as web-api v7 is a breaking change. Updating web-api within bolt to v7 will necessitate a new major release of bolt. We are planning on doing this, but it will take a bit more time as there are other packages that bolt relies on (like @slack/socket-mode) that will also include breaking changes (though I am working on that as well; see #1732).
Ultimately your specific error here is dependent on how you import and use the types from web-api vs. bolt.
If you want to use BOTH bolt v3.x (with bundled web-api v6) AND web-api v7 at the same time, it will take delicate care, knowing that the two major versions of web-api are incompatible and which client is used in which situation.
After updating
@slack/web-api
from v6 to v7, some imported type in TS were not sync anymore between@slack/bolt
module and@slack/web-api
module.Example :
must become
because the last version of
@slack/bolt
is using@slack/web-api
v6 so the app failed to build.Error was the following:
In node_modules/@slack/bolt/dist/types/middleware.d.ts,
WebClient
is defined asimport { WebClient } from '@slack/web-api';
The text was updated successfully, but these errors were encountered: