Skip to content

Cannot find type definition file for 'minimatch' #17342

Closed as not planned
Closed as not planned

Description

@anuj9196

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nextjs

SDK Version

10.1.0

Framework Version

Next 15.4.5

Link to Sentry event

No response

Reproduction Example/SDK Setup

After installing latest version of @sentry/nextjs, building application started giving error

pnpm run build

The erorr

Type error: Cannot find type definition file for 'minimatch'.
  The file is in the program because:
    Entry point for implicit type library 'minimatch'

After deep checking, @sentry/nextjs is the only package depending on minimatch

This package is also mentioned in this pull request merged on July 2
#16789

Steps to Reproduce

  1. Setup new nextjs project
  2. Install @sentry/nextjs then run
  3. Build application by running
pnpm run build

Expected Result

minimatch should be part of the package and installed automatically

Actual Result

minimatch requires external installation and interrupts building application. Initially it is difficult to find the root cause because of very generic error statement without mentioning traceback.

Activity

  1. linear commented on Aug 6, 2025

    @linear
  2. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Aug 6, 2025
  3. mydea commented on Aug 7, 2025

    @mydea
    Member

    Hey, the minimatch version we include ships its own types. What version of this is installed for you, and do you have more details (e.g. a stacktrace, ...) about the error?

  4. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Aug 7, 2025
  5. anuj9196 commented on Aug 7, 2025

    @anuj9196
    Author

    @mydea Installing it manually solved the issue. The version installed is

    "minimatch": "^10.0.3",
    

    command used

    pnpm add minimatch
    
  6. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Aug 7, 2025
  7. mydea commented on Aug 7, 2025

    @mydea
    Member

    but without installing it manually...? We use v9 internally, but that also has types and is a regular dependency so should be installed normally for you 🤔

  8. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Aug 7, 2025
  9. moved this to Waiting for: Community in GitHub Issues with 👀 3on Aug 7, 2025
  10. getsantry commented on Aug 29, 2025

    @getsantry

    This issue has gone three weeks without activity. In another week, I will close it.

    But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


    "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions