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

TypeError: Cannot redefine property: when shimming #2260

Closed
anuraaga opened this issue Jun 7, 2021 · 4 comments
Closed

TypeError: Cannot redefine property: when shimming #2260

anuraaga opened this issue Jun 7, 2021 · 4 comments
Labels
bug Something isn't working stale

Comments

@anuraaga
Copy link
Contributor

anuraaga commented Jun 7, 2021

From aws-observability/aws-otel-lambda#99

It seems that based on certain build systems like esbuild it's possible to create a bundle which doesn't work well with shimmer. Is this something that can be worked around or is inevitable and a symptom of these build systems making the result closer to a type-safe language than a dynamic one?

@vmarchaud
Copy link
Member

Looking at the code (https://github.com/othiym23/shimmer/blob/master/index.js#L14), it seems the object is enumerable but not updatable. I think this is a case that should be handled by shimmer but that surely means that instrumentation would not work.

@github-actions
Copy link

github-actions bot commented Mar 7, 2022

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the stale label Mar 7, 2022
@github-actions
Copy link

This issue was closed because it has been stale for 14 days with no activity.

@joshuabellewDandG
Copy link

This is still an ongoing issue, which has been mentioned in multiple places.
evanw/esbuild#2199
aws-observability/aws-otel-lambda#99
aws-observability/aws-otel-lambda#97

This is a big problem when using aws cdk constructs which use esbuild to transpile to commonjs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

3 participants