How can I use LUIS in app.js to recognize dialogs that I have in different folders

Microsoft BotbuilderSDK: 3.15.0 Language: NodeJs

I have my dialogs in different folders. However, I am trying to initialize them in the app.js folder so that I can use LUIS when the intent matches the dialog, but it is not working.

NOTE - Each dialog works when I call them in a structure similar to the following:


Here is the full source code:

const restify = require('restify');

const builder = require('botbuilder');

var fs = require('fs');

var clients = require('restify-clients');

var azure = require('botbuilder-azure');

var listenPort = process.env.port || process.env.PORT || 3978;

var server = restify.createServer()

server.listen(listenPort, '::', () => {
  console.log(`smooth like a baby's bottom`)

var connector = new builder.ChatConnector({
    appId: process.env.MICROSOFT_APP_ID,
    appPassword: process.env.MICROSOFT_APP_PASSWORD

var bot = new builder.UniversalBot(connector, function (session) {
    session.endDialog(`I'm sorry, I did not understand '${session.message.text}'.\nType 'help' to know more about me :)`)
}).set('storage', cosmosStorage);

var luisRL = new builder.LuisRecognizer(process.env.LUIS_MODEL_URL).onEnabled(function (context, callback) {
  var enabled = context.dialogStack().length === 0
  callback(null, enabled)

var intents = new builder.IntentDialog({ recognizers: [luisRL] });
bot.recognizer(intents);'/api/messages', connector.listen());

bot.on('conversationUpdate', function (message) {
  if (message.membersAdded) {

    greetings = 'welcome to Joey's Pizza?'

    message.membersAdded.forEach(function (identity) {
      if ( === {
        bot.send(new builder.Message()