TypeError: Cannot redefine property: default
See original GitHub issueUsing Node 12.16.1, TypeScript 3.8.3, and tslib 1.12.0 I’m seeing this error:
/Users/phensley/dev/cldr-engine/node_modules/tslib/tslib.js:237
Object.defineProperty(o, "default", { enumerable: true, value: v });
^
TypeError: Cannot redefine property: default
at Function.defineProperty (<anonymous>)
at /Users/phensley/dev/cldr-engine/node_modules/tslib/tslib.js:237:16
at Object.__importStar (/Users/phensley/dev/cldr-engine/node_modules/tslib/tslib.js:246:9)
at Object.<anonymous> (/Users/phensley/dev/cldr-engine/packages/cldr-compiler/lib/cli/compiler/index.js:4:21)
Occurs when __importStar
is called:
import * as yargs from 'yargs';
Transpiled to:
var yargs = tslib_1.__importStar(require("yargs"));
Issue Analytics
- State:
- Created 3 years ago
- Reactions:12
- Comments:10 (3 by maintainers)
Top Results From Across the Web
TypeError: Cannot redefine property: default #38679 - GitHub
I've tried both with and without esModuleInterop on, and can't replicate your result.
Read more >TypeError: can't redefine non-configurable property "x"
The JavaScript exception "can't redefine non-configurable property" occurs when it was attempted to redefine a property, but that property is non-configurable.
Read more >Why can't I redefine a property in a Javascript object?
You are unable to redefine the property because Object.defineProperty() defaults to non-configurable properties, from the docs: configurable.
Read more >awslabs/aws-cdk - Gitter
Unable to determine the default AWS account (did you configure "aws configure"?): TypeError: Cannot redefine property: default.
Read more >How to solve "Cannot redefine property: handler" on AWS ...
Hey, there! Today I spent a good few hours trying to solve a problem on AWS Lambda and given how deep... Tagged with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@weswigham if there’s any breaking change introduced, it would be nice if a new release could be published with a major version update. This minor release broke a lot of packages that the community heavily depends on.
@DanielRosenwasser Please, consider reverting this release till the reasonable alternative is found.
Howdy everyone - if you’re still working with TS <= 3.8, the new tslib version
1.13.0
should fix the issues you were having; it does not support live bindings, but should continue to work with both older and newer emit without a runtime error. The newly published tslib2.0.0
has the contents of the former1.12.0
, and provides support for live bindings alongside TS 3.9+ emit; so nobody should be installing it by accident in existing projects anymore~ Sorry for the inconvenience everyone ❤️