aws-doc-sdk-examples icon indicating copy to clipboard operation
aws-doc-sdk-examples copied to clipboard

Polly using: HTML/JAVASCRIPT: Error: import declarations may only appear at top level of a module

Open Mirror-Mode opened this issue 2 years ago • 1 comments

Expected behavior

Hi there,

I'am trying to use polly on a website using the HTML and main.js. I have installed all sdk packages without any errors on my ubuntu system.

If i load the polly.html i get Error: import declarations may only appear at top level of a module with all my browsers i am using. Please see below. It seems to be, it is only a problem from the first import module.

Tried as well to change

to:

but this will run into other errors.

Would be great if somebody can reach out.

Many thanks,

Stefan

Actual behavior

HTML Error: import declarations may only appear at top level of a module from main.js line 1 import { CognitoIdentityClient } from "@aws-sdk/client-cognito-identity";

Steps to reproduce

nothing more to tell....

Logs / stacktrace (if applicable)

no further logs

Which SDK were you using?

JavaScript

Which OS were you using?

Linux

SDK version

latest github aws-sdk

OS version

Ubuntu 18.x

Mirror-Mode avatar Aug 16 '22 17:08 Mirror-Mode

Hi, @Mirror-Mode. Can you please provide the steps you're using to build and run the example?

cpyle0819 avatar Aug 25 '22 14:08 cpyle0819

I have not been able to reproduce this issue. Closing this for now. Please reopen if steps to reproduce can be provided.

cpyle0819 avatar Oct 26 '22 12:10 cpyle0819