1

I just created my package and published it to artifact registry. This package has postinstall script that works if I do npm i inside package directory, even if there is no node_modules directory.

Inside postinstall script I use patch-package from npm to overwrite few dependencies.

The problem is when I install this package in other project with npm i -s @my/package. When postinstall script is executing it doesn`t find those packages and throw errors.

I tried to execute patch-package in parent directory but it does not find those packages anyway.

Any idea what I can do to fix this?

czlowiek488
  • 187
  • 2
  • 17

1 Answers1

0

To fix problem I added in postinstall script installation script for those packages npm i dep1@0.0.0 dep2@0.0.0 dep3@0.0.0 && rest....

czlowiek488
  • 187
  • 2
  • 17