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

fix(js): handle tsconfig file with no compilerOptions #25966

Merged
merged 1 commit into from
May 23, 2024

Conversation

isaacplmann
Copy link
Collaborator

Handles adding a root tsconfig.base.json when there is a root tsconfig.json with no compilerOptions property.

Prerequisites:
Have a repository has a root tsconfig.json with no compilerOptions property and there is no root tsconfig.base.json.

Steps to reproduce:

  1. Generate a js library (nx g @nx/js:lib my-lib)

Expected results:
Library is created.

Actual results:
There is an error.

 NX   Cannot read properties of undefined (reading 'rootDir')

This PR fixes the error.

@isaacplmann isaacplmann requested a review from a team as a code owner May 23, 2024 18:53
@isaacplmann isaacplmann requested a review from jaysoo May 23, 2024 18:53
Copy link

vercel bot commented May 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview May 23, 2024 6:55pm

@isaacplmann isaacplmann merged commit a1ba0ad into master May 23, 2024
6 checks passed
@isaacplmann isaacplmann deleted the js/tsconfig-without-compilerOptions branch May 23, 2024 19:43
FrozenPandaz pushed a commit that referenced this pull request May 24, 2024
Handles adding a root `tsconfig.base.json` when there is a root
`tsconfig.json` with no `compilerOptions` property.

Prerequisites:
Have a repository has a root `tsconfig.json` with no `compilerOptions`
property and there is no root `tsconfig.base.json`.

Steps to reproduce:
1. Generate a js library (`nx g @nx/js:lib my-lib`)

Expected results:
Library is created.

Actual results:
There is an error.

```
 NX   Cannot read properties of undefined (reading 'rootDir')
```

This PR fixes the error.

(cherry picked from commit a1ba0ad)
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants