You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Botkit部署Rasa_NLU Slack聊天机器人遇“未找到undefined项目”错误

Fixing "No project found with name 'undefined'" Error with Botkit + Rasa NLU for Slack

Hey there! Let's work through this error you're seeing when trying to chat with your Rasa NLU bot via Slack (even though the bot shows as online). Based on the error message and your setup, here are the most actionable fixes to check out:

1. Verify Botkit's Rasa Project Name Configuration

The "undefined" project name means Botkit isn't getting a valid project identifier to send to your Rasa server. Double-check your Botkit integration code:

  • If you're using the botkit-rasa package, make sure you explicitly set the project parameter in the initialization. For example:
    const rasa = require('botkit-rasa')({
      rasa_uri: 'http://localhost:5005', // Match your local Rasa server URL
      project: 'default' // Use your actual Rasa project name—default is "default" if you didn't customize it
    });
    
  • Avoid leaving this field empty or relying on an uninitialized variable that resolves to undefined.

2. Confirm Rasa Server's Project Setup

Your Rasa server needs to be running with the same project name you specified in Botkit:

  • If you trained your model with the default project, start Rasa with:
    rasa run --enable-api --cors "*"
    
  • If you used a custom project name during training (e.g., rasa train --project my-slack-bot), start the server with that project flag:
    rasa run --enable-api --cors "*" --project my-slack-bot
    
  • Test the Rasa API directly to confirm the project is recognized: run curl http://localhost:5005/model/parse?q=hello and check the response for a project field—this should match what's in your Botkit config.

3. Check Environment Variables & Working Directory

Sometimes missing or misloaded environment variables cause this issue:

  • If you're using an env var to set the project name (e.g., process.env.RASA_PROJECT), make sure you've exported it before starting Botkit:
    export RASA_PROJECT=default
    node your-botkit-script.js
    
  • Ensure Botkit is running from the correct working directory. If your config files are in a subfolder, double-check that path references aren't broken, leading to missing configuration values.

4. Validate botkit-rasa Version Compatibility

Older versions of botkit-rasa might use different parameter names (like project_name instead of project). Check your installed version with:

npm list botkit-rasa

Then adjust your configuration to match the parameter names expected by that version.

Start with the first two checks—mismatched or missing project names are the most common cause of this error. Let me know if any of these steps get your bot chatting with Slack properly!

内容的提问来源于stack exchange,提问作者Vincent

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 10:26:38