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.

node v17: Error loading `tslib` helper library

See original GitHub issue

What happens and why it is wrong

Error loading `tslib` helper library.
/Users/weiran/repo/dian/tsdx/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:25177
    throw e;
    ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './package.json' is not defined by "exports" in /Users/weiran/repo/dian/tsdx/node_modules/rollup-plugin-typescript2/node_modules/tslib/package.json

Environment

Versions
  Node: 17.0.0
  OS: macOS 12.0
  yarn: 3.0.2

   rollup: ^2.57.0 => 2.58.0 
    rollup-plugin-typescript2: ^0.30.0 => 0.30.0 
    typescript: ^4.4.3 => 4.4.4

rollup.config.js

`rollup.config.js`:

tsconfig.json

`tsconfig.json`:

package.json

`package.json`:

plugin output with verbosity 3

plugin output with verbosity 3:

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:7
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
aladdin-addcommented, Oct 21, 2021
  1. just down to node < 17
  2. yarn resolutions:
"resolutions":{
  "tslib": "2.3.1"
}
3reactions
aladdin-addcommented, Nov 17, 2021

confirmed it has been fixed in v0.31.0. 🎉

and seems also fixed https://github.com/ezolenko/rollup-plugin-typescript2/issues/267?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix “Error loading tslib helper library ... - Ilya G
$ node -v. If you see v.17 — follow the easy steps below to manage this issue. · $ npm install -g n....
Read more >
"This syntax requires an imported helper but module 'tslib ...
In my case the error Cannot find module 'tslib' was caused by special builder @nrwl/node:build in my Angular repository (I'm using nrwl/nx ...
Read more >
Top 5 tslib Code Examples - Snyk
To help you get started, we've selected a few tslib examples, based on popular ways it is used in public projects. Secure your...
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
... Bug:165330 - "dev-java/sun-jdk-1.6.0-r1 error while loading shared libraries: libjli.so - /proc is not mounted" status:RESOLVED resolution:OBSOLETE ...
Read more >
dts-cli | Yarn - Package Manager
a fork of the official tsdx. $ npm install dts-cli -D # for npm users $ yarn add dts-cli -D # for yarn...
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