Closed someonelikeTIM closed 3 years ago
Tracked this down to be an issue with how file resources are discovered and loaded. The JS SDK recursively searches for declarative asset files beginning with the application root directory. This will eventually include files in both the dialogs/imported
path as well as those inside node_modules
. As it turns out, we probably want to ignore node_modules
as they are already imported by Composer when installing a package.
Hi @someonelikeTIM - this will be addressed in our upcoming release.
@cwhitten Do you have an ETA for that release?
@someonelikeTIM, I just pushed a development build of the JS SDK with the fix for this. Can you update your package.json
file to list "botbuilder-dialogs-adaptive-runtime-integration-express": "4.13.5-preview"
(instead of 4.13.4-preview
). Then, run npm install
and you should be in business.
EDIT: Updated to note that 4.13.5
is available on NPM with this fix as well.
The bot is now failing to start. Here is the error message:
Error occurred building the bot
Error: DialogSet.add(): Invalid dialog being added. at DialogSet.add (C:\AzureBots\Development\osumc-helpbot-v2\CoreWithLanguage\CoreWithLanguage\node_modules\botbuilder-dialogs-adaptive-runtime\node_modules\botbuilder-dialogs\lib\dialogSet.js:119:19) at DialogManager.set rootDialog [as rootDialog] (C:\AzureBots\Development\osumc-helpbot-v2\CoreWithLanguage\CoreWithLanguage\node_modules\botbuilder-dialogs-adaptive-runtime\node_modules\botbuilder-dialogs\lib\dialogManager.js:67:26) at new DialogManager (C:\AzureBots\Development\osumc-helpbot-v2\CoreWithLanguage\CoreWithLanguage\node_modules\botbuilder-dialogs-adaptive-runtime\node_modules\botbuilder-dialogs\lib\dialogManager.js:48:29) at new CoreBot (C:\AzureBots\Development\osumc-helpbot-v2\CoreWithLanguage\CoreWithLanguage\node_modules\botbuilder-dialogs-adaptive-runtime\lib\coreBot.js:23:31) at services.addFactory (C:\AzureBots\Development\osumc-helpbot-v2\CoreWithLanguage\CoreWithLanguage\node_modules\botbuilder-dialogs-adaptive-runtime\lib\index.js:173:16) at factories.reduce (C:\AzureBots\Development\osumc-helpbot-v2\CoreWithLanguage\CoreWithLanguage\node_modules\botbuilder-dialogs-adaptive-runtime\node_modules\botbuilder-dialogs-adaptive-runtime-core\lib\serviceCollection.js:129:67) at Array.reduce (<anonymous>) at nodes.reduce (C:\AzureBots\Development\osumc-helpbot-v2\CoreWithLanguage\CoreWithLanguage\node_modules\botbuilder-dialogs-adaptive-runtime\node_modules\botbuilder-dialogs-adaptive-runtime-core\lib\serviceCollection.js:129:40) at Array.reduce (<anonymous>) at ServiceCollection.buildNodes (C:\AzureBots\Development\osumc-helpbot-v2\CoreWithLanguage\CoreWithLanguage\node_modules\botbuilder-dialogs-adaptive-runtime\node_modules\botbuilder-dialogs-adaptive-runtime-core\lib\serviceCollection.js:114:32) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! CoreWithLanguage@ dev: `cross-env NODE_ENV=dev node index.js "--port" "3980" "--urls" "http://0.0.0.0:3980" "--luis:endpointKey" "_removed_" "--SkillHostEndpoint" "http://127.0.0.1:3980/api/skills"` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the CoreWithLanguage@ dev script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\wate18\AppData\Roaming\npm-cache\_logs\2021-05-27T20_44_51_749Z-debug.log
Can you confirm that all your botbuilder-* versions have been updated? They should all list 4.13.5, and if you look at your yarn.lock or package-lock.json file that's the only version number you should see (some may include "-preview").
All of them show 4.13.5 except the following:
Updating all the botbuilder packages in your package.json file and running npm install
again should update everything to 4.13.5
. There are a few instanceof
checks, including where you're seeing this error. If the versions aren't locked to the same exact number this can happen.
I updated all the botbuilder packages in package.json and ran npm install. Everything in package-lock has been updated to 4.13.5. Now I get the following error when trying to run the bot.
Error occurred building the bot
Error: DialogSet.add(): Invalid dialog being added. at DialogSet.add (C:\AzureBots\Development\osumc-helpbot-v2\CoreWithLanguage\CoreWithLanguage\node_modules\botbuilder-dialogs-adaptive-runtime\node_modules\botbuilder-dialogs\lib\dialogSet.js:119:19) at DialogManager.set rootDialog [as rootDialog] (C:\AzureBots\Development\osumc-helpbot-v2\CoreWithLanguage\CoreWithLanguage\node_modules\botbuilder-dialogs-adaptive-runtime\node_modules\botbuilder-dialogs\lib\dialogManager.js:67:26) at new DialogManager (C:\AzureBots\Development\osumc-helpbot-v2\CoreWithLanguage\CoreWithLanguage\node_modules\botbuilder-dialogs-adaptive-runtime\node_modules\botbuilder-dialogs\lib\dialogManager.js:48:29) at new CoreBot (C:\AzureBots\Development\osumc-helpbot-v2\CoreWithLanguage\CoreWithLanguage\node_modules\botbuilder-dialogs-adaptive-runtime\lib\coreBot.js:23:31) at services.addFactory (C:\AzureBots\Development\osumc-helpbot-v2\CoreWithLanguage\CoreWithLanguage\node_modules\botbuilder-dialogs-adaptive-runtime\lib\index.js:173:16) at factories.reduce (C:\AzureBots\Development\osumc-helpbot-v2\CoreWithLanguage\CoreWithLanguage\node_modules\botbuilder-dialogs-adaptive-runtime\node_modules\botbuilder-dialogs-adaptive-runtime-core\lib\serviceCollection.js:129:67) at Array.reduce (<anonymous>) at nodes.reduce (C:\AzureBots\Development\osumc-helpbot-v2\CoreWithLanguage\CoreWithLanguage\node_modules\botbuilder-dialogs-adaptive-runtime\node_modules\botbuilder-dialogs-adaptive-runtime-core\lib\serviceCollection.js:129:40) at Array.reduce (<anonymous>) at ServiceCollection.buildNodes (C:\AzureBots\Development\osumc-helpbot-v2\CoreWithLanguage\CoreWithLanguage\node_modules\botbuilder-dialogs-adaptive-runtime\node_modules\botbuilder-dialogs-adaptive-runtime-core\lib\serviceCollection.js:114:32) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! CoreWithLanguage@ dev: `cross-env NODE_ENV=dev node index.js "--port" "3980" "--urls" "http://0.0.0.0:3980" "--luis:endpointKey" "_removed_" "--SkillHostEndpoint" "http://127.0.0.1:3980/api/skills"` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the CoreWithLanguage@ dev script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\wate18\AppData\Roaming\npm-cache\_logs\2021-06-01T15_54_21_851Z-debug.log
Here are the contents of the referenced log file:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'dev',
1 verbose cli '--',
1 verbose cli '--port',
1 verbose cli '3980',
1 verbose cli '--urls',
1 verbose cli 'http://0.0.0.0:3980',
1 verbose cli '--luis:endpointKey',
1 verbose cli '_removed_',
1 verbose cli '--SkillHostEndpoint',
1 verbose cli 'http://127.0.0.1:3980/api/skills' ]
2 info using npm@6.4.1
3 info using node@v10.15.3
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle CoreWithLanguage@~predev: CoreWithLanguage@
6 info lifecycle CoreWithLanguage@~dev: CoreWithLanguage@
7 verbose lifecycle CoreWithLanguage@~dev: unsafe-perm in lifecycle true
8 verbose lifecycle CoreWithLanguage@~dev: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\AzureBots\Development\osumc-helpbot-v2\CoreWithLanguage\CoreWithLanguage\node_modules\.bin;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Integrad.3\MIV;C:\Program Files (x86)\Hyland\Web ActiveX\;C:\Program Files\nodejs\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\PuTTY\;C:\Program Files\dotnet\;C:\Program Files (x86)\Sennheiser\SenncomSDK\;C:\Users\wate18\AppData\Local\Programs\Python\Python38-32\Scripts\;C:\Users\wate18\AppData\Local\Programs\Python\Python38-32\;C:\Users\wate18\AppData\Local\Microsoft\WindowsApps;C:\Users\wate18\AppData\Roaming\npm;C:\Users\wate18\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\wate18\AppData\Local\Programs\Git\cmd;C:\Users\wate18\.dotnet\tools
9 verbose lifecycle CoreWithLanguage@~dev: CWD: C:\AzureBots\Development\osumc-helpbot-v2\CoreWithLanguage\CoreWithLanguage
10 silly lifecycle CoreWithLanguage@~dev: Args: [ '/d /s /c',
10 silly lifecycle 'cross-env NODE_ENV=dev node index.js "--port" "3980" "--urls" "http://0.0.0.0:3980" "--luis:endpointKey" "_removed_" "--SkillHostEndpoint" "http://127.0.0.1:3980/api/skills"' ]
11 silly lifecycle CoreWithLanguage@~dev: Returned: code: 1 signal: null
12 info lifecycle CoreWithLanguage@~dev: Failed to exec dev script
13 verbose stack Error: CoreWithLanguage@ dev: `cross-env NODE_ENV=dev node index.js "--port" "3980" "--urls" "http://0.0.0.0:3980" "--luis:endpointKey" "_removed_" "--SkillHostEndpoint" "http://127.0.0.1:3980/api/skills"`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:189:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:189:13)
13 verbose stack at maybeClose (internal/child_process.js:970:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid CoreWithLanguage@
15 verbose cwd C:\AzureBots\Development\osumc-helpbot-v2\CoreWithLanguage\CoreWithLanguage
16 verbose Windows_NT 10.0.14393
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev" "--" "--port" "3980" "--urls" "http://0.0.0.0:3980" "--luis:endpointKey" "_removed_" "--SkillHostEndpoint" "http://127.0.0.1:3980/api/skills"
18 verbose node v10.15.3
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error CoreWithLanguage@ dev: `cross-env NODE_ENV=dev node index.js "--port" "3980" "--urls" "http://0.0.0.0:3980" "--luis:endpointKey" "_removed_" "--SkillHostEndpoint" "http://127.0.0.1:3980/api/skills"`
22 error Exit status 1
23 error Failed at the CoreWithLanguage@ dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
@someonelikeTIM, could you shoot me an email? I'd like to take a closer look at your package and lock file(s). My email address is in my Github profile.
Closing due to inactivity
Describe the bug
I created a new bot using the template: "Core Bot with Language" (Node). I updated the Bot Response under "WelcomeDialog" but the emulator continues to display the original bot response. I updated the Bot Response under "HelpDialog" and the same thing happens - it continues to use the original responses from the template even though they have been changed in Composer. I have restarted the bot, restarted composer+emulator, no change.
Version
Version: 2.0.0 Electron: 8.2.4 Chrome: 80.0.3987.165 NodeJS: 12.13.0 V8: 8.0.426.27-electron.0
Browser
[ x ] Chrome
OS
[ x ] Windows
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The bot should respond using the Bot Responses defined in Composer.
Screenshots