For historical purposes and possible future reference, here are my notes on why I backed out a change to use npm-shrinkwrap.json
in markdownlint-cli2
.
The basic problem is that npm will include platform-specific packages in npm-shrinkwrap.json
. Specifically, if one generates npm-shrinkwrap.json
on Mac, it may include components (like fsevents
) that are only supported on Mac. Attempts to use a published package with such a npm-shrinkwrap.json
on a different platform like Linux or Windows fails with EBADPLATFORM
. This seems (to me, currently) like a fundamental and fatal flaw with the way npm implements npm-shrinkwrap.json
. And while there are ways npm might address this problem, the current state of things seems unusably broken.
To make this concrete, the result of running rm npm-shrinkwrap.json && npm install && npm shrinkwrap
for this project on macOS can be found here: . Note that fsevents
is an optional M