fix: Add package-lock.json to repository for CI/CD reproducibility
Fixed CI/CD pipeline failure by removing package-lock.json from .gitignore and adding it to version control. ## Problem CI/CD pipeline was failing with: ``` ::error::Dependencies lock file is not found in /workspace/Weyoun/chess. Supported file patterns: package-lock.json,npm-shrinkwrap.json,yarn.lock ``` The pipeline uses `npm ci` which requires package-lock.json for: - Reproducible builds across environments - Exact dependency version matching - Faster, more reliable installations - Security auditing consistency ## Root Cause package-lock.json was incorrectly listed in .gitignore, preventing it from being committed to the repository. This is a common mistake - while node_modules/ should be ignored, package-lock.json MUST be versioned. ## Solution 1. Removed package-lock.json from .gitignore 2. Added explanatory comment about why it should be committed 3. Added package-lock.json to repository (287KB, 553 packages) ## Impact ✅ CI/CD pipeline can now run `npm ci` successfully ✅ Reproducible builds across all environments ✅ Consistent dependency versions for all developers ✅ Faster CI/CD runs (npm ci vs npm install) ✅ Better security auditing ## Best Practice package-lock.json should ALWAYS be committed for: - Applications (like this chess game) - CI/CD reproducibility - Team collaboration It should only be excluded for: - Libraries published to npm (so consumers control versions) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
2dd2439662
commit
5d3675bf0f
2
.gitignore
vendored
2
.gitignore
vendored
@ -28,7 +28,7 @@ hive-mind-prompt-*.txt
|
|||||||
# Project specific
|
# Project specific
|
||||||
# Dependencies
|
# Dependencies
|
||||||
node_modules/
|
node_modules/
|
||||||
package-lock.json
|
# Note: package-lock.json SHOULD be committed for reproducible builds
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
coverage/
|
coverage/
|
||||||
|
|||||||
7830
package-lock.json
generated
Normal file
7830
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user