patch-package icon indicating copy to clipboard operation
patch-package copied to clipboard

Can `patch-package` be used to modify postinstall script of other npm?

Open yiliang114 opened this issue 2 years ago • 2 comments

Such as vscode-ripgrep, It has a postinstall script. In some scenarios, I need to install this package, but I don't want it to execute postinstall script.

image

Can I modify postinstall script content through patch-package? It seems that it is not possible, because patch-package needs to execute its own postinstall script to modify the dependency content under the node_modules after installing the dependency, but at the same time, the postinstall scripts of other packages are already being executed.

yiliang114 avatar Jun 06 '23 03:06 yiliang114

I have the same need. How did you solve it? @yiliang114

lemontree2000 avatar Nov 09 '23 03:11 lemontree2000

There are some "postinstall broken" npm packages too.Seems there is not a workaround about the problem.

Leonewu avatar Jan 20 '24 14:01 Leonewu