Skip to content

[BUG] npm doctor erroneously complains about /opt/homebrew/bin/.keepme #8397

Open
@hamstergene

Description

@hamstergene

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

npm doctor complains about every non-executable file in global bin folder:

Checking permissions on global bin folder
npm error doctor checkFilesPermission Missing permissions on /opt/homebrew/bin/.keepme (expect: executable)
Not ok
Check the permissions of files in /opt/homebrew/bin

There is no requirement for every file in global bin folders to be executable. In this case, the file is kept by macOS Homebrew to prevent folder deletion if it ever becomes empty. Making it executable would make it globally available as a command, even though it has no contents.

Expected Behavior

Without breaking the existing behavior, npm doctor could:

  • Exclude files with zero size — there is no point to expect them to be executable
  • Exclude files starting with period
  • Both of the above

Steps To Reproduce

  1. Install Homebrew on fresh Mac: https://brew.sh
  2. Install Node via Homebrew: brew install node
  3. Run npm doctor
  4. See unwarranted checkFilesPermission complaint

Environment

  • npm: v11.4.2
  • Node.js: 24.3.0
  • OS Name: macOS 15.5
  • Extra: have Homebrew installed

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next steps

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions