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

[turborepo] code generator not working. #6656

Closed
mayank1513 opened this issue Nov 30, 2023 · 8 comments · Fixed by inkbeard/monorepo#356
Closed

[turborepo] code generator not working. #6656

mayank1513 opened this issue Nov 30, 2023 · 8 comments · Fixed by inkbeard/monorepo#356
Assignees
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage owned-by: turborepo

Comments

@mayank1513
Copy link

mayank1513 commented Nov 30, 2023

What version of Turborepo are you using?

1.10.16

What package manager are you using / does the bug impact?

pnpm

What operating system are you using?

Windows

Describe the Bug

Turborepo generators used to work well in my repo. However, after recent updates, it doesn't work.

When I run yarn turbo gen it throws following error.

>>> Unexpected error. Please report it as a bug:
error TS6053: File 'tsconfig/base.json' not found.

Repo - https://github.com/react18-tools/react18-themes

Expected Behavior

Turborepo generators should generate the expected files without throwing meaningless errors.

To Reproduce

git clone https://github.com/react18-tools/react18-themes.git
cd react18-themes
pnpm i
pnpm turbo gen

Throws error.

Reproduction Repo

https://github.com/react18-tools/react18-themes

@mayank1513 mayank1513 added kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage owned-by: turborepo labels Nov 30, 2023
@flextremedev
Copy link
Contributor

I'm having the same issue. Please note that your repo under Reproduction Repo is not accessible (Page not found).

@mayank1513
Copy link
Author

I'm having the same issue. Please note that your repo under Reproduction Repo is not accessible (Page not found).

Hi, thanks for the observation. I have updated it - https://github.com/react18-tools/react18-themes

@tknickman
Copy link
Member

Taking a look!

@tknickman tknickman self-assigned this Nov 30, 2023
@tknickman
Copy link
Member

Still investigating this, but it looks to be path related. Using global turbo seems to work fine (turbo gen), but invoking through the package manager (pnpm turbo gen) is causing this error.

@tknickman
Copy link
Member

Alright turns out this is a Typescript bug. They shipped an issue in 5.3.2 that causes extends to not resolve properly in some cases:

microsoft/TypeScript#53314

Downgrade back to 5.2.2 for now with pnpm install typescript@5.2.2 --save-dev -r and it will solve this issue!

@tknickman
Copy link
Member

Small correction of the diagnosis, typescript did not ship a bug, they changed an internal API which ts-node (used by plop.js that our generators are built off of) depended on.

@tknickman
Copy link
Member

Linking the ts-node issue here as well: TypeStrong/ts-node#2076

@mayank1513
Copy link
Author

Thanks for the diagnosis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage owned-by: turborepo
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants