question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

tslib@1.12.0 breaks typeorm

See original GitHub issue

After upgrading tslib to 1.12, I get the following error message when requiring ‘typeorm’(which requiring tslib@^1.9.0)

> require('typeorm')
Uncaught:
TypeError: Cannot set property EntityManager of #<Object> which has only a getter
    at Object.<anonymous> (/path/to/typeorm-test/node_modules/typeorm/index.js:120:23)
    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)

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 by export * from './other-files' indirectly, the above error will be thrown when it is explicitly exported again in same file.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
thynsoncommented, May 13, 2020

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.

0reactions
weswighamcommented, Jun 15, 2020

cough https://github.com/microsoft/TypeScript/pull/38809 cough

Maybe wanna review that and backport to 3.9

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find module "tslib" - angular - Stack Overflow
I resolved the issue by removing the wrong import for the Type. This should be coming from Angular Core. removed
Read more >
error [exceptionhandler] wrong driver: "undefined" given.
When I run yarn typeorm -- migration:run I'm getting Error during migration run: MissingDriverError: Wrong driver: "undefined" given. Supported drivers are: " ...
Read more >
typeorm - npm
TypeORM is an ORM that can run in NodeJS, Browser, Cordova, PhoneGap, Ionic, React Native, NativeScript, Expo, and Electron platforms and ...
Read more >
type-graphql | Yarn - Package Manager
... common tasks repeatable for almost every resolver const repository = TypeORM. ... v0.12.0. Features. Breaking Change: remove deprecated ActionData and ...
Read more >
Notices_BigFix_Mobile_MCM_V...
MIT github.com/robotsandpencils/buford-v0.12.0 ... JavaScript library for Line Breaking and identifying Word Boundaries, ... MIT typeorm-0.2.341.tgz.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found