← All tasks
javascriptcssnano/cssnano #1046Not a task: not reproduced

[Bug] : cssnano v5 breaks on yarn/npm with --no-bin-links due to postinstall step for opencollective

envgap__cssnano__cssnano-1046

01 / FAILURE SIGNATURE

As reported upstream

error /drone/src/node_modules/cssnano: Command failed.
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
2bde30337b66b107ea9419b283fc9caa35f27fe0
Manifest
packages/cssnano/package.json
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

cssnano/cssnano #1046 · read the original issue
**Describe the bug**

cssnano v5 added forced dependency on `opencollective-postinstall` with `postinstall` which breaks on yarn/npm with `--no-bin-links`.



**To Reproduce**

```

$ yarn --frozen-lockfile --non-interactive --no-bin-links --production

yarn install v1.22.5

[1/5] Validating package.json...

[2/5] Resolving packages...

[3/5] Fetching packages...

info fsevents@1.2.13: The platform "linux" is incompatible with this module.

info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.

[4/5] Linking dependencies...

[5/5] Building fresh packages...

info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

error /drone/src/node_modules/cssnano: Command failed.

Exit code: 127

Command: opencollective-postinstall

Arguments: 

Directory: /drone/src/node_modules/cssnano

Output:

/bin/sh: opencollective-postinstall: not found

```



**Expected behavior**

No issue during install in all environments supported by `cssnano`



**Additional context**

Generally acceptable solution here would be to use `node ./node_modules/opencollective-postinstall/index.js`.



`--no-bin-links` is a very useful option on filesystems where creating symlinks is not possible.



In addition note that the build failed on CI here despite the fact that `opencollective-postinstall` should have check for `process.env.CI`.
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]