Skip to content

[BUG] npm install <folder> runs prepare #8121

Open
@winstliu

Description

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

Running npm install ../../some/other/path/globals will attempt to run globals' prepare script.

Expected Behavior

I would expect the script not to run, as the documentation for prepare says "Runs on local npm install without any arguments". This is not a local npm install witout any arguments - I view it the same as npm install globals, which does not run prepare.

Steps To Reproduce

  1. Install the globals package somewhere
  2. In a completely different folder, run npm install ../path/to/globals to try to symlink it
  3. :(

Environment

  • npm: 11.1.0
  • Node.js: 22.14.0
  • OS Name: Windows 11 24H2
  • System Model Name: Surface
  • npm config:
; This is the only non-commented, non-authentication line
prefix = "C:\\Users\\winstonliu\\AppData\\Roaming\\npm"

Activity

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

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