-
Notifications
You must be signed in to change notification settings - Fork 137
TypeError: Cannot redefine property: default #102
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
Comments
Ahh yeah, |
Encounter this as well just now, my dev env broke. It was working ok since yesterday. when I run my start script "start": "node build/index.js" I see this
I am using "typescript": "^3.8.2" This is the compiled ts code to js that seemed to be where it is complaining
|
@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. |
I also noticed the same issue in my projects. Yesterday everything worked as expected, I didn't make any packages updates. Today I rebuild my docker image and I got the following error: /app/src/index.ts:141
export {EntityManager} from "./entity-manager/EntityManager";
^
TypeError: Cannot set property EntityManager of #<Object> which has only a getter
at Object.<anonymous> (/app/src/index.ts:141:9)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Module.require (internal/modules/cjs/loader.js:1044:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (/app/src/commands/SchemaSyncCommand.ts:1:1)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10) I'm pretty sure that this issue also is causing problems in typeorm package. |
Same error with |
I've installed tslib 1.11.2 directly as a dependency as it seems to fix the issue for me so far "tslib": "~1.11.2" not sure if this works for other cases tho |
1.13.0 should fix this and be available now. |
Howdy everyone - if you're still working with TS <= 3.8, the new tslib version |
Hi |
Had the same issue. This comment has a temporary solution. |
Using Node 12.16.1, TypeScript 3.8.3, and tslib 1.12.0 I'm seeing this error:
Occurs when
__importStar
is called:import * as yargs from 'yargs';
Transpiled to:
var yargs = tslib_1.__importStar(require("yargs"));
The text was updated successfully, but these errors were encountered: