Files
low-code-react-app-b/docs/deployment/CI_FIX_SUMMARY.md
2026-01-17 00:33:02 +00:00

1.7 KiB

CI/CD Fix Summary

Problem

The CI/CD pipeline was failing during the npm ci step with the following error:

npm error Invalid: lock file's @github/spark@0.0.1 does not satisfy @github/spark@0.44.15
npm error Missing: octokit@5.0.5 from lock file
npm error Missing: @octokit/app@16.1.2 from lock file
... (and many more missing dependencies)

Root Cause

The package-lock.json file was out of sync with package.json. This happened because:

  1. Dependencies were updated in package.json but the lock file wasn't regenerated
  2. The @github/spark workspace dependency version changed
  3. New octokit dependencies were added but not reflected in the lock file

Solution Applied

Ran npm install to regenerate the package-lock.json file. This:

  • Updated the lock file to match all dependencies in package.json
  • Resolved all missing octokit dependencies
  • Synced the @github/spark workspace reference
  • Ensured npm ci will work correctly in CI/CD

Next Steps

  1. Commit the updated package-lock.json to your repository
  2. Push the changes to trigger the CI/CD pipeline again
  3. The npm ci command should now succeed

Prevention

To avoid this issue in the future:

  • Always run npm install after updating package.json
  • Commit both package.json AND package-lock.json together
  • Use npm ci locally to test that the lock file is valid
  • Consider adding a pre-commit hook to validate lock file sync

CI/CD Command Explanation

  • npm ci (Clean Install) requires exact lock file match - used in CI/CD for reproducible builds
  • npm install updates the lock file if needed - used in development

The CI/CD pipeline uses npm ci because it's faster and ensures consistent builds across environments.