TS: Cannot find module '@slack/bolt'
See original GitHub issueI have no idea why when I have clearly run yarn, this doesn’t resolve still

import { App } from '@slack/bolt';
require('dotenv/config');
export const app = new App({
endpoints: {
events: '/slack/events',
actions: '/slack/actions',
},
token: process.env.SLACK_BOT_TOKEN,
signingSecret: process.env.SLACK_SIGNING_SECRET,
clientId: process.env.SLACK_CLIENT_ID,
clientSecret: process.env.SLACK_CLIENT_SECRET,
stateSecret: 'my-state-secret',
scopes: [
'app_mentions:read',
'chat:write',
'chat:write.public',
'chat:write.customize',
'channels:read',
'channels:manage',
'channels:join',
'groups:write',
'im:write',
'users:read',
'groups:read',
'incoming-webhook',
'im:history',
'commands',
],
});
My package.json:
"dependencies": {
"@slack/bolt": "^2.1.1",
"@slack/events-api": "^2.3.2",
"@slack/web-api": "^5.10.0",
"@slack/types": "^1.10.0",
...
If I’ve run yarn this should not be an issue. Yet TS complains it still is.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
@slack/bolt - npm
A framework for building Slack apps, fast.. Latest version: 3.12.2, last published: 2 months ago. Start using @slack/bolt in your project by ...
Read more >TS cannot find modules - typescript - Stack Overflow
I have ran the generator with the following environment: typescript, react, webpack w/ NPM, gulp. When I run gulp serve I get the...
Read more >Getting started with Bolt for JavaScript
This guide is meant to walk you through getting up and running with a Slack app using Bolt for JavaScript. Along the way,...
Read more >Build a Slackbot in Node.js with Slack's Bolt API
Build a Slackbot in Node.js with Slack's Bolt API ... To get started, we'll need a workspace to install our bot in. A...
Read more >Top 5 @slack/bolt Code Examples - Snyk
To help you get started, we've selected a few @slack/bolt examples, ... Not working // Should error because message_action doesn't have type action_id ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@dschinkel As the type for the field is
string | string[]
, it should work for sure: https://github.com/slackapi/bolt-js/blob/%40slack/bolt%403.3.0/src/receivers/HTTPReceiver.ts#L21 Probably the error you’re facing may be due to another cause.@dschinkel Great to know you’ve figured the cause out.
It’s not valid for the default receiver
HTTPReceiver
since v3. It works with a string or an array of string. TheExpressReceiver
still accepts the object but actually the keys in the objet are not used at all.