We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I followed the documentation here: https://github.com/aws-samples/amazon-cognito-passwordless-auth/blob/main/CUSTOMIZE-AUTH.md to setup custom email templates and ran into an error
SyntaxError: Cannot use import statement outside a module.
This was fixed by adding:
import * as lambdaNodeJs from "aws-cdk-lib/aws-lambda-nodejs"; createAuthChallenge: { entry: "functions/src/passwordless/createAuthChallenge.ts", bundling: { format: lambdaNodeJs.OutputFormat.ESM, banner: "import{createRequire}from 'module';const require=createRequire(import.meta.url);", }, },
Looks like it needs ESM to use the import syntax.
The text was updated successfully, but these errors were encountered:
You're right, we do set it to ESM in the lib, but if you override the bundling property, you should add it again as you did.
bundling
Thanks for reporting. You're probably not the first one to run into this!
Want to send a PR to add it to the code example in the docs?
Sorry, something went wrong.
No branches or pull requests
I followed the documentation here: https://github.com/aws-samples/amazon-cognito-passwordless-auth/blob/main/CUSTOMIZE-AUTH.md to setup custom email templates and ran into an error
This was fixed by adding:
Looks like it needs ESM to use the import syntax.
The text was updated successfully, but these errors were encountered: