yarn2nix
and peerDependencies
#140088
Labels
0.kind: bug
Something is broken
2.status: stale
https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
6.topic: nodejs
If a Node.js package has
peerDependencies
in itspackage.json
,yarn2nix
doesn't install these dependencies when building the package. These should be installed during the package build process. For example, imagine you're designing a React library that exports some bespoke React components. It's typical in this case to list "react" and "react-dom" aspeerDependencies
, meaning that they'll be installed for local development and testing (and for things like Storybook.js), but not in the published package, aspeerDependencies
are supposed to be installed by the downstream consumer of the package.Therefore, according to my understanding,
yarn2nix
should be installingpeerDependencies
prior to thebuildPhase
, in case the user overrides the defaultbuildPhase
, or adds apostBuild
step that runs, e.g.,yarn --offline build
. As it stands, such phases will break due to the missing dependencies.The text was updated successfully, but these errors were encountered: