s1seven / schema-tools

Tools to create, validate and render certificates using Material Identity JSON schemas
https://materialidentity.org/
Apache License 2.0
1 stars 1 forks source link

bug: ci fails when pushing `chore(release): publish` commit after running `nx release` #253

Closed eamon0989 closed 7 months ago

eamon0989 commented 7 months ago

When creating a new release using nx release, the ci job publish fails every time - https://github.com/s1seven/schema-tools/actions/runs/8157244270/job/22296463018

The issue is that the root package-lock.json file is not in sync after the updates, causing the ci to fail with the following error:

npm ERR! npm ci can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with npm install before continuing.

Investigate why the updated package-lock.json file is not being automatically committed.

eamon0989 commented 7 months ago

It seems that nx release calls a function called updateLockFile which runs npm install --package-lock-only which removes some entries from the package-lock.json file which is causing it to be out of sync with the package.json file, see the root package-lock.json file on this commit

There are several issues open on the nx repo that may be related: https://github.com/nrwl/nx/issues/22066 https://github.com/nrwl/nx/issues?q=is%3Aissue+package-lock.json