-
Notifications
You must be signed in to change notification settings - Fork 137
[email protected] breaks typeorm #107
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
I have the same error. I tried to install |
Have you tried removing the node_modules and lockfile before downgrading tslib to |
I solved it afterwards. Here is my full answer. P.S. If you have solved the problem. please close the issue that you opened here. |
I've solved it before submit this issue, but I think it's an accidential breaking change of tslib and they should fix it. |
Fixed #107 |
Is tslib even regression tested with the most popular TypeScript libraries? |
1.13.0 is out and should fix things, 1.12.0 has been deprecated. 2.0.0 can be opted into for TypeScript 3.9 users. |
@weswigham @rbuckton any clues? |
This is the main reason: typeorm/typeorm#6054 (comment) They have two lines in their export * from "./entity-manager/EntityManager"; export {EntityManager} from "./entity-manager/EntityManager"; We aren't tracking the re-export in the same way we do a local export: I think this is an issue for the compiler/emitter, not input // @target: esnext
// @module: commonjs
// @importHelpers: true
export * from "./other";
export { Foo } from "./other";
export class Bar {} actual output "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Bar = void 0;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./other"), exports);
var other_1 = require("./other");
Object.defineProperty(exports, "Foo", { enumerable: true, get: function () { return other_1.Foo; } });
class Bar {
}
exports.Bar = Bar; expected output "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Bar = exports.Foo = void 0;
// ^^^^^^^^^^^^^
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./other"), exports);
var other_1 = require("./other");
Object.defineProperty(exports, "Foo", { enumerable: true, get: function () { return other_1.Foo; } });
class Bar {
}
exports.Bar = Bar; |
cough microsoft/TypeScript#38809 cough Maybe wanna review that and backport to 3.9 |
Uh oh!
There was an error while loading. Please reload this page.
After upgrading tslib to 1.12, I get the following error message when requiring 'typeorm'(which requiring tslib@^1.9.0)
It seems like there's breaking changes in
tslib.__exportStar()
that defining getter instead of defining properties on target object. Resulting that once a symbol has already been exported byexport * from './other-files'
indirectly, the above error will be thrown when it is explicitly exported again in same file.The text was updated successfully, but these errors were encountered: