npm / npm/cli

postinstall not being executed for pngquant-bin on MacOS

Open
#2,853 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Release 7.x
Dominant language
JavaScript
Stars
10.1k
Forks
4.7k
Avg merge
2d 2h
Merged PRs (30d)
19

Description

Current Behavior:

One of subdependencies is pngquant-bin which have postinstall script which is not being executed now

Expected Behavior:

postinstall should execute and generate node_modules/pngquant-bin/vendor/pngquant file

Steps To Reproduce:

Do npm ci for this package.json file
https://github.com/llamerr/npm-postinstall-bug
and check content of ls node_modules/pngquant-bin/vendor/
as of now, it only contains source folder, but pngquant file is missing

No errors or warnings reported by npm during install from what I see, https://github.com/llamerr/npm-postinstall-bug/blob/master/install.log

It probably started happening after yesterday's upgrade on MacOS. First after I did rm -rf node_modules and npm ci everything broke, so I checked updates and noticed new, upgraded my MacOS, brew, and command line tools. After everything started working again, I still was getting errors in my code which lead me to pngquant bin being missing. I'm using node from nvm if it matters, not sure if I did global packages update (I think I did? At least for some of them, will re-try now), but seems other stuff working fine.

Environment:

OS: MacOS Big Sur 11.2.3 (20D91)

➜ npm-postinstall-bug git:(master) node -v
v14.15.3

➜ npm-postinstall-bug git:(master) npm -v
7.6.2

➜ npm-postinstall-bug git:(master) pkgutil --pkg-info=com.apple.pkg.CLTools_Executables

package-id: com.apple.pkg.CLTools_Executables
version: 12.4.0.0.1.1610135815
volume: /
location: /
install-time: 1615403944
groups: com.apple.FindSystemFiles.pkg-group

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the linked repository's package.json with npm ci on the reported macOS and Node.js environment. Inspect install.log and node_modules/pngquant-bin/vendor/ to compare the missing generated file with the expected postinstall behavior. Done means the postinstall script runs during installation and produces the pngquant file without errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.