Skip to content
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

Seemingly false alerm in monorepo: This syntax requires an imported helper but module 'tslib' cannot be found. #46288

Closed
vilicvane opened this issue Oct 10, 2021 · 4 comments
Labels
Needs More Info The issue still hasn't been fully clarified

Comments

@vilicvane
Copy link
Contributor

Bug Report

The project uses yarn workspaces and has many packages with structures like:

- node_modules/
- package.json
- packages/
   - app/
     - node_modules/ 
     - package.json
   - server
     - node_modules/
     - package.json

In my case "tslib" is added to every relevent nested package.json but obviously it's only present under root node_modules/.

🔎 Search Terms

🕗 Version & Regression Information

This changed between versions 4.4.3 and 4.5.0-beta

💻 Code

import * as ReactDOM from 'react-dom';

🙁 Actual behavior

packages/app/src/program/main.tsx:3:1 - error TS2354: This syntax requires an imported helper but module 'tslib' cannot be found.

3 import * as ReactDOM from 'react-dom';
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

🙂 Expected behavior

No error.


Let me know if a repro is needed.

@andrewbranch andrewbranch added the Needs More Info The issue still hasn't been fully clarified label Oct 12, 2021
@andrewbranch
Copy link
Member

Yes, a repro is needed. Thanks!

@vilicvane
Copy link
Contributor Author

vilicvane commented Oct 13, 2021

https://github.com/vilic/bug-repros/tree/typescript-46288

Seems that "nodenext" just doesn't play along with "importHelpers".

@andrewbranch
Copy link
Member

Oh, that’s probably fixed in #46156. Can you try again with the nightly?

@vilicvane
Copy link
Contributor Author

That seems to have fixed the problem, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs More Info The issue still hasn't been fully clarified
Projects
None yet
Development

No branches or pull requests

2 participants