pnpm: readPackage hook can not effect scripts.postinstall

pnpm version: 5.15.0

I need to disable postinstall script of one of the packages (but I can not use --ignore-script as it effects all), so wanted to do this via readPackage hook, but it doesn’t seem to have an effect, postinstall is still running.

Expected behavior:

I would expect that postinstall behaviour could be changed for particular package script via readPackage hook.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (7 by maintainers)

Commits related to this issue

Most upvoted comments

We can add support for a new property for disabling specific package’s scripts. For instance:

{
  "pnpm": {
    "neverBuiltDependencies": ["fsevents"]
  }
}

this is a way too complex scenario. It will not work.