aws-lex-web-ui
aws-lex-web-ui copied to clipboard
Sample code references incompatible version of aws sdk
The sample code has
however, this causes a failure on lex-web-ui.js:146 because LexRuntimeConstructorV2 does not exist in that SDK version. if (!AWSConfigConstructor || !CognitoConstructor || !PollyConstructor || !LexRuntimeConstructor || !LexRuntimeConstructorV2) { throw new Error('unable to find AWS SDK'); }
The current master branch is using aws-sdk-2.875.0 as defined in src/lex-web-ui-loader/js/defaults/dependencies.js. Webpack should be constructing the library such that this is loaded externally from the site. Are you not seeing this behavior in browser after an upgrade to 0.18.0 or a fresh install from the current distribution repositories? Can you point us at the website to have a quick check?
Hi there,
I've tested this using the full page sample on a project that I am currently working on and I receive the error that the aws-sdk could not be found. After changing the sdk version to the latest available on cloudflare's CDN, I get a working page.
cfcdn: https://cdnjs.cloudflare.com/ajax/libs/aws-sdk/2.951.0/aws-sdk.min.js
I hope this brings some further diagnosis.