Skip to content
This repository was archived by the owner on Aug 11, 2022. It is now read-only.
This repository was archived by the owner on Aug 11, 2022. It is now read-only.

feature request: prevent Spotlight from indexing node_modules folders #15346

Description

@PierBover

What's the feature?

On macOS NPM could optionally add a .metadata_never_index file in the node_modules folder to prevent Spotlight from indexing those folders.

What problem is the feature intended to solve?

While indexing those folders with so many files Spotlight consumes valuable CPU resources. A simple way of preventing this in an automated way is by automatically adding a .metadata_never_index file in the node_modules folder.

It's common practice that most users put the node_modules folder in .gitignore so this would not be a problem for Windows or Linux users.

Is the absence of this feature blocking you or your team? If so, how?

In some systems with large projects Spotlight indexing of these folders can clog the CPU affecting the performance of the machine.

Is this feature similar to an existing feature in another tool?

Not that I know of.

Is this a feature you're prepared to implement, with support from the npm CLI team?

Yes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions