Skip to content

[BUG] npm install does not run prepare script for local file dependencies #459

@HosseinAgha

Description

@HosseinAgha

What / Why

Imagine I have package-a that depends on the package-b using the file specifier.
For example we have this dependency line in the package.json of package-a:

"name": "package-a",
"dependencies": {
   "package-b": "file:../package-b"
}

How

Current Behavior

If I run npm install in package-a then npm correctly installs package-b dependencies.
But it only runs preinstall and postinstall scripts and ignores prepare script.
If I run npm install directly in package-b then it successfully runs the prepare script.

Expected Behavior

It should run prepare script for local dependencies (package-b) like it would for github dependencies. This gets very confusing for npm users as npm install would run inconsistent scripts for different dependency types.

References

I think #321 is related but it seems fixed in the latest version.

npm version

I use node v12.13.0 and npm 6.13.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions