aws-lex-web-ui icon indicating copy to clipboard operation
aws-lex-web-ui copied to clipboard

Sample code references incompatible version of aws sdk

Open daneps opened this issue 3 years ago • 2 comments

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'); }

daneps avatar Apr 27 '21 17:04 daneps

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?

bobpskier avatar May 08 '21 12:05 bobpskier

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.

Elycin avatar Jul 22 '21 16:07 Elycin