Cocos creator cli build debug
Skill ChrisLamDev/cocos-creator-debug-skills/skills/cocos-creator-cli-build-debug
17 executable AI agent skills for Cocos Creator 3.x debugging
npx -y skills add ChrisLamDev/cocos-creator-debug-skills --skill cocos-creator-cli-build-debugAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use when Cocos Creator 3.x CLI build fails with scene or library errors.
SKILL.md
2.7 KB, 624 tokens by cl100k_base, as published. Nobody here has run it
Cocos Creator CLI Build Debug
Debug Cocos Creator 3.x CLI build failures — scene JSON corruption, library import errors, and resource missing errors.
Common CLI Build Errors
| Error | Likely Cause | Check |
|---|---|---|
| Error 1222/1223 | Scene JSON corrupt | python3 -c "import json; json.load(open('assets/scenes/MainScene.scene'))" |
resource.ac not found | Asset bundle missing | Check assets/bundle/ exists |
| Module import failed | TS compile error | Run npx tsc --noEmit |
| Library version mismatch | Cocos version conflict | Check package.json @cocos/creator version |
WeChat Mini Game (wechatgame) Known Issues
Cannot set property 'w' of undefined (2026-06-16)
- Symptom: Console shows
TypeError: Cannot set property 'w' of undefined at trt (virtual cc-XXX.js:2) - Root cause: Cocos engine rendering pipeline initialization fail →
FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENTin OpenGL framebuffer - NOT fixed by: Disabling video/webview engine modules, delaying bootstrap init, or changing camera settings
- Status: Confirmed as Cocos 3.8.8 engine bug on WeChat mini game platform
- Workaround: Not found yet — needs Cocos official patch or engine config deep-dive
- Evidence: Bootstrapper mounts successfully, 7 menu buttons created, project starts — but black screen due to rendering pipeline fail
Build Performance
- First build with full engine modules: ~42 seconds
- After disabling unused modules: ~7 seconds
- Key modules to keep for 2D zen game: base, 2d, ui, graphics, gfx-webgl, animation, audio, tween, particle-2d
- Modules safe to disable: video, webview, 3d (if 2D only), physics-3d, gfx-webgpu
Scene Config Tips
project.jsonstartScenemust match the actual scene UUID- Build uses
profiles/v2/packages/builder.jsonscenes[]list — all listed scenes get built overwriteProjectSettingsin builder.json can override engine module settings- After changing engine.json modules, run a full rebuild (not incremental)
Build Command (CLI, no GUI needed)
/Applications/Cocos/Creator/3.8.8/CocosCreator.app/Contents/MacOS/CocosCreator --project . --build "platform=wechatgame"
Recovery Flow
- Fix any TS compile errors first
- If scene corrupt: restore from git or rebuild in Editor
- Clear library cache:
rm -rf library/ - Re-import assets: Open project in Cocos Creator (GUI)
See references/error-catalog.md for complete error code reference.