Skip to content
New issue

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

Cannot find module 'utf8' #31

Open
caevv opened this issue Oct 6, 2022 · 2 comments
Open

Cannot find module 'utf8' #31

caevv opened this issue Oct 6, 2022 · 2 comments

Comments

@caevv
Copy link

caevv commented Oct 6, 2022

import { Construct } from "constructs";
import { Stack } from "aws-cdk-lib";
import { SesSmtpCredentials } from "ses-smtp-credentials-cdk/cdkv2";

export class EmailInitialiser extends Construct {
  public readonly username: string;
  public readonly password: string;

  constructor(scope: Construct, id: string) {
    super(scope, id);

    const smtpCredentials = new SesSmtpCredentials(this, id + "Credentials", {
      region: Stack.of(scope).region,
    });
    this.username = smtpCredentials.username();
    this.password = smtpCredentials.password();
  }
}
Received response status [FAILED] from custom resource. Message returned: Error: Cannot find module 'utf8'
Require stack:
- /var/task/index.js
- /var/runtime/UserFunction.js
- /var/runtime/Runtime.js
- /var/runtime/index.js
at _loadUserApp (/var/runtime/UserFunction.js:221:13)
at Object.module.exports.load (/var/runtime/UserFunction.js:279:17)
at Object.<anonymous> (/var/runtime/index.js:43:34)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)
@ChristopheBougere
Copy link

Same error here with cdkv2

@plumdog
Copy link
Contributor

plumdog commented Feb 13, 2023

I believe I have fixed this in https://www.npmjs.com/package/ses-smtp-credentials-cdk/v/1.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants