Skip to content

[BUG] npm install script override works like postinstall #1196

Closed
@qwelias

Description

@qwelias

What / Why

We're using yarn to manage workspaces, I thought I'd be nice to avoid any related overhead in the manual and just override install with yarn. It works and does not go into recursion, but npm still definitely does the installation before it fires yarn.

{
  "scripts": {
    "install": "yarn install --ignore-scripts"
  },
  "devDependencies": {
    "yarn": "^1.22.4"
  }
}

When

example above

Where

in scripts

How

{
  "scripts": {
    "install": "echo install"
  },
  "devDependencies": {
    "yarn": "^1.22.4"
  }
}

Current Behavior

npm install still installs and then echoes

Steps to Reproduce

npm install

Expected Behavior

npm install only echoes

Who

me?

References

didn't find any

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions