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

ESBuild error when importing serialize-error #89

Closed
casertap opened this issue Sep 26, 2023 · 1 comment
Closed

ESBuild error when importing serialize-error #89

casertap opened this issue Sep 26, 2023 · 1 comment

Comments

@casertap
Copy link

My esbuild doesnt resolve serialize-error node package.

➜  cognito-triggers source ~/.aws/lu && sam build && sam deploy --config-file samconfig.dev.toml

Building codeuri: .../cognito-triggers/lambdas runtime: nodejs18.x metadata: {'BuildMethod': 'esbuild', 'BuildProperties': {'Format': 'cjs', 'Minify': False, 'Target':
'es2022', 'EntryPoints': ['src/trigger-post-confirmation.ts']}} architecture: x86_64 functions: CognitoTriggerPostConfirmationFunction
Running NodejsNpmEsbuildBuilder:CopySource
Running NodejsNpmEsbuildBuilder:NpmInstall
Running NodejsNpmEsbuildBuilder:EsbuildBundle

Build Failed
Error: NodejsNpmEsbuildBuilder:EsbuildBundle - Esbuild Failed: ✘ [ERROR] Could not resolve "serialize-error"

    src/trigger-post-confirmation.ts:2:31:
      2 │ import { serializeError } from "serialize-error";
        ╵                                ~~~~~~~~~~~~~~~~~

  You can mark the path "serialize-error" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.

1 error

Other package are working fine. Why is serialize-error different?

@sindresorhus
Copy link
Owner

@sindresorhus sindresorhus closed this as not planned Won't fix, can't repro, duplicate, stale Sep 26, 2023
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

2 participants