Claude-skill-registry build-troubleshooting
FAQ for diagnosing and resolving build and test failures
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/build-troubleshooting" ~/.claude/skills/majiayu000-claude-skill-registry-build-troubleshooting && rm -rf "$T"
skills/data/build-troubleshooting/SKILL.mdBuild & Test Troubleshooting FAQ
Purpose: Reference guide for diagnosing and resolving build failures, test failures, and other development environment issues.
When to use: When encountering unexpected build or test failures, especially those that seem environment-related rather than code-related.
FAQ
Q1: NeoForge GameTest fails with "Illegal version number specified version (main)"
Symptoms:
File /path/to/neoforge-1.21.2/build/resources/main is not a valid mod file Caused by: java.lang.IllegalArgumentException: Illegal version number specified version (main)
Cause: IDE (IntelliJ IDEA, Eclipse) generated
bin/ directories containing unprocessed resource files. The neoforge.mods.toml in bin/main/META-INF/ has version="${version}" instead of the actual version number.
Solution:
- Delete IDE-generated bin directories:
rm -rf neoforge-1.21.2/bin common-1.21.2/bin - Or run the cleanAll task which now includes bin/ cleanup:
./gradlew cleanAll
Prevention:
- Configure IDE to use Gradle for builds instead of built-in compiler
- Add
tobin/
(already done in this project).gitignore
Reference: Discovered 2026-01-25 during portal GameTest implementation.
Q2: GameTest structure template not found or too small
Symptoms:
- Tests fail with "structure not found" errors
- Portal/structure tests fail because test area is too small
Cause:
- Fabric uses
constant (built-in)FabricGameTest.EMPTY_STRUCTURE - NeoForge requires explicit structure template files
Solution: For NeoForge, create a proper NBT structure file:
- Create
inempty_test.nbtcommon-{version}/src/main/resources/data/chronodawn/structure/ - Reference it as
in test configuration"chronodawn:empty_test"
Note: The structure must be large enough for the test content (e.g., 10x10x10 for portal frame tests).
Q3: Gradle daemon conflicts during parallel builds
Symptoms:
- Build fails with lock file errors
- "Could not create service of type" errors
- Tests hang or fail intermittently
Solution:
./gradlew --stop ./gradlew cleanAll
Q4: Test passes on Fabric but fails on NeoForge (or vice versa)
Checklist:
- Mixin configurations: Check both loader-specific mixin JSON files
- Structure templates: NeoForge needs explicit templates, Fabric has EMPTY_STRUCTURE
- API differences: Some APIs behave differently between loaders
- IDE artifacts: Run
to remove stale bin/ directories./gradlew cleanAll
Q5: "session.lock" errors during GameTest
Symptoms:
Failed to lock the level ... session.lock
Cause: Previous test run left a lock file.
Solution: The
gameTestAll task already handles this by cleaning stale world directories. If it persists:
rm -rf fabric-*/run/gametestworld rm -rf neoforge-*/run/gametestworld
Adding New FAQ Entries
When encountering a new build/test issue:
- Document symptoms (exact error message)
- Identify root cause
- Document solution
- Add prevention tips if applicable
- Add reference date for tracking