npm install optipng-bin Failed at the [email protected] postinstall script

as shown in the question, error when installing optipng-bin dependency in the project, screenshot as shown below:

from the error message, it seems to be similar to the Linux system source installation, I thought this problem could not be solved, until I found a way to add a parameter to the installation, –ignore-scripts is ok, as shown below:

is a little hard to believe, but it’s true, it seems to bypass source compilation. A bit of a surprise, a bit of a surprise. I hope it will be helpful to those who encounter this problem.

Read More: