Skip to content

Conversation

@jaysoo
Copy link
Member

@jaysoo jaysoo commented Nov 24, 2025

There's a problem when @nx/rollup is installed with [email protected], and typechecks.

This is caused by the transitive dependency chain:

[email protected] -> [email protected] -> @types/[email protected] -> @types/minimatch

When users run tsc without explicit types configuration, TypeScript auto-discovers @types/minimatch from node_modules but can't properly resolve it.

Note: This doesn't happen with NPM and PNPM, nor newer yarn versions.

Verified fix with this repro: https://github.com/jaysoo/rollup-251124

Fixes #32398

After upgrading to Nx 21.4.0, TypeScript type-checking fails with
"Cannot find type definition file for 'minimatch'" error. This is
caused by the transitive dependency chain:

[email protected] -> [email protected] -> @types/[email protected] -> @types/minimatch

When users run tsc without explicit types configuration, TypeScript
auto-discovers @types/minimatch from node_modules but can't properly
resolve it.

No type errors related to minimatch when running type-check.

Fixes #32398
@jaysoo jaysoo requested review from a team as code owners November 24, 2025 21:48
@jaysoo jaysoo requested a review from leosvelperez November 24, 2025 21:48
@vercel
Copy link

vercel bot commented Nov 24, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nx-dev Ready Ready Preview Nov 25, 2025 7:46pm

@netlify
Copy link

netlify bot commented Nov 24, 2025

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit c061645
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/6926066509a4f80008646ad9
😎 Deploy Preview https://deploy-preview-33601--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud
Copy link
Contributor

nx-cloud bot commented Nov 24, 2025

View your CI Pipeline Execution ↗ for commit c061645

Command Status Duration Result
nx affected --targets=lint,test,test-kt,build,e... ✅ Succeeded 18m 23s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 2m 46s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 11s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-25 20:04:02 UTC

nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

…plugin

Fixes asset path handling in nxCopyAssetsPlugin to prevent double-nested
output directories. When using assets like { input: '.', glob: 'libs/childlib/README.md' },
files now correctly copy to dist/libs/childlib/README.md instead of
dist/libs/childlib/libs/childlib/README.md.

The fix extracts literal directory prefixes from glob patterns and incorporates
them into the input path, ensuring CopyAssetsHandler receives properly normalized
relative paths.
nx-cloud[bot]

This comment was marked as outdated.

…plugin

Fixes asset path handling in nxCopyAssetsPlugin to prevent double-nested
output directories. When using assets like { input: '.', glob: 'libs/childlib/README.md' },
files now correctly copy to dist/libs/childlib/README.md instead of
dist/libs/childlib/libs/childlib/README.md.

The fix extracts literal directory prefixes from glob patterns and incorporates
them into the input path, ensuring CopyAssetsHandler receives properly normalized
relative paths. [Self-Healing CI Rerun]
Copy link
Contributor

@nx-cloud nx-cloud bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nx Cloud has identified a flaky task in your failed CI:

🔂 Since the failure was identified as flaky, we reran your CI automatically.

Nx Cloud View detailed reasoning in Nx Cloud ↗


🎓 Learn more about Self-Healing CI on nx.dev

@jaysoo jaysoo merged commit 017ad93 into master Nov 26, 2025
20 checks passed
@jaysoo jaysoo deleted the issue-32398 branch November 26, 2025 13:55
jaysoo added a commit that referenced this pull request Nov 26, 2025
…33601)

There's a problem when `@nx/rollup` is installed with [email protected], and
typechecks.

This is caused by the transitive dependency chain:

```
[email protected] -> [email protected] -> @types/[email protected] -> @types/minimatch
```

When users run tsc without explicit `types` configuration, TypeScript
auto-discovers `@types/minimatch` from `node_modules` but can't properly
resolve it.

Note: This doesn't happen with NPM and PNPM, nor newer yarn versions.

Verified fix with this repro: https://github.com/jaysoo/rollup-251124

Fixes #32398

---------

Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com>
Co-authored-by: jaysoo <[email protected]>
FrozenPandaz pushed a commit that referenced this pull request Nov 27, 2025
…33601)

There's a problem when `@nx/rollup` is installed with [email protected], and
typechecks.

This is caused by the transitive dependency chain:

```
[email protected] -> [email protected] -> @types/[email protected] -> @types/minimatch
```

When users run tsc without explicit `types` configuration, TypeScript
auto-discovers `@types/minimatch` from `node_modules` but can't properly
resolve it.

Note: This doesn't happen with NPM and PNPM, nor newer yarn versions.

Verified fix with this repro: https://github.com/jaysoo/rollup-251124

Fixes #32398

---------

Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com>
Co-authored-by: jaysoo <[email protected]>
(cherry picked from commit 017ad93)
@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

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 Dec 2, 2025
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.

21.4.0 minimatch type errors

3 participants