auto-installing peerDependencies in npm@7 means ipfs-utils
installs react-native
everywhere.
#130
Labels
need/triage
Needs initial labeling and prioritization
a trimmed down look at the
node_modules
dir afternpm install
withnpm@7
in a project that depends onipfs-utils
now has >100MiB of react-native deps forced on it.npm@7
started forcing everyone to install the cumulative peerDependencies for any that are not explcitly depended on.the workaround is to
npm i --legacy-peer-deps
but it seems awkward to expect all consumers to do that.The culprit (aside from npm@7) is (at least) the dep on
react-native-fetch-api
which brings in rn as a peerDep:https://github.com/react-native-community/fetch/blob/8903bb7ee2c673da52f2e84172bef0752f2bedc5/package.json#L61-L62
We might PR that repo to remove the peerDependency, now npm@7 is the current default installed with node@16, but it's not an unreasonable thing for a react-native extention to do... it's exactly what peerDependecies are for. It we can't upstream that change we should fork, as it's not reasonable for something like
ipfs-core-types
to bring the entirereact-native
party due to a transitive dep onipfs-utils
The text was updated successfully, but these errors were encountered: