I'm a begginer in development and I try to develop a slack bot with the following code:
const {App} = require('@slack/bolt');
const app = new App ({
token : process.env.SLACK_BOT_TOKEN,
signingSecret: process.env.SLACK_SIGNING_SECRET
});
(async () => {
await app.start(process.env.PORT || 3000);
})();
for my .env:
{
SLACK_BOT_TOKEN = "my token",
SLACK_SIGNING_SECRET = "my Signing Secret"
}
and my package.json:
"scripts": {
"dev":"nodemon slack.js"
},
"dependencies": {
"@slack/bolt": "^3.11.0",
}
but it doesn't works. I have this message:
AppInitializationError: signingSecret is required to initialize the default receiver. Set signingSecret or use a custom receiver. You can find your Signing Secret in your Slack App Settings.
When I refer to the documentation of Slack, and after verification and code review, it seems to be the same, someone knows why ?