I’m adventuring packaging a node.js application.
I’m currently trying nixpkgs.buildNpmPackage
to do this. Given the number of bugs, and difficulties, I’ve feeling like I may not be a target use case.
The application is managed using npm and most of its dependencies are not in nixpkgs.
Do you know who the primary consumers of buildNpmPackage
are?
Or if you use npm and nix together, how do you mix both worlds successfully?
notes on my experience thus far
- I’m packaging node-canvas: https://github.com/Automattic/node-canvas/. I hope to upstream this effort to nixpkgs.
-
buildNpmPackage
assumes dependencies will have apackage-lock.json
. I need to document the bug but found one code path where this line failed. -
buildNpmPackage
requires one’spackage-lock.json
to have been generated with correctresolved
andintegrity
keys. As a naive developer, this tripped me up for a few days. Unfortunately this is an upstream issue: https://github.com/npm/cli/issues/4263