The package hapi-7.5.3 has a file named npm-shrinkwrap.json at the top-level, this file seems to pin the dependencies to specific versions, even if they are out-dated.
While building with nix-build, npm install makes multiple request to example.com to fetch different version than the latest, and finally fails at parsing HTML as a valid JSON file.
A temporary work-around consist at removing the file $PWD/npm-shrinkwrap.json at the end of the configurePhase of buildNodePackage expression.
I did a workaround with removing npm-shrinkwrap.json for now. I also added support for overrides in node-packages.nix where you can define your custom patchPhase :)
The package
hapi-7.5.3
has a file namednpm-shrinkwrap.json
at the top-level, this file seems to pin the dependencies to specific versions, even if they are out-dated.While building with nix-build,
npm install
makes multiple request to example.com to fetch different version than the latest, and finally fails at parsing HTML as a valid JSON file.A temporary work-around consist at removing the file
$PWD/npm-shrinkwrap.json
at the end of the configurePhase of buildNodePackage expression.