Open bnavigator opened 1 month ago
Its' even worse. What is described as fix above only works in a local osc build
. On the server I now get resolver errors. :(
A few things here. First, you are patching package.json
and generating package-lock.json
without keeping the patch? Why? package.json
patch should be part of the package sources.
Secondly, package-lock.json
is a generated file and you can view it as part of the intermediate sources generated. The package-lock that is generated in the chroot/VM will be different when run vs. remote npm registry since it contains resolved FQDN. That's just how npm works.
Finally, the package-lock.json generated by npm to be used by the node_modules service is for one purpose only -- to download the remote assets so they are available in the chroot later on. This OBS service downloads the resolved tarballs for the build service.
The one thing that could be added to instructions is to have rm -f package-lock.json
to be run before the install
command is run. What do you think?
As reported by @bmwiedemann in boo#1231254, the instructions as of now cause the creation of non-reproducible package-lock.json files.
Specfile of python-panel:
After the
%build
stage, there is apanel/package-lock.json
again, which differs from%{SOURCE10}
:Of I use
--no-package-lock
(https://github.com/openSUSE/npm-localhost-proxy/issues/1), the file will be created by the npm call of the python wheel build later on. With the same localhost problem.This is avoided with
Which results in a deterministic package-lock.json
Conclusion: The instructions in the README must be adjusted from not only deleting the original package-lock.json but replacing it with our own.
https://github.com/openSUSE/obs-service-node_modules/blob/1daa6a2701acc862dd051e00a131693d7640f189/README.md?plain=1#L31-L33