Six Common HBuilderX and WeChat DevTools Failures and Their Fixes
Recently, after completing a teaching assignment at Anhui Normal University, I reviewed the common problems students generally encountered during their learning and practice. Combined with classroom observations, I have compiled a teaching reflection, hoping to provide a reference for future learners.
1. The plugin is always "running"
In HBuilderX, clicking "Run to Mini Program" at the top triggers a prompt, and neither closing nor restarting resolves it.
Solution: This problem is mostly caused by corrupted software plugin caches or missing program files. Uninstall the current HBuilderX, clean up residual cache files, and then reinstall the official genuine software to completely resolve it.
2. Cannot log in after scanning the QR code for the Mini Program development tool
Problem Phenomenon: When using WeChat to scan the QR code to log into the Mini Program development tool, the phone shows a successful login, but the editor on the computer remains stuck on the login interface and is unresponsive. At the same time, the editor's backend throws an error message: Error: Error Error: Need to log in again (code 10).
Solution
- Basic solution: Uninstall the current WeChat Developer Tools, reinstall the corresponding version of the software, and try logging in again;
- Advanced solution: If the problem persists after reinstallation, it indicates a compatibility bug in the current version. Replace it with a different stable version and reinstall to use it normally.
3. After clicking "Run", a Mini Program startup interface settings dialog pops up
Solution: Manually re-select the installation directory of the WeChat Developer Tools. Note: only select the root folder of the directory; do not select the 'Mini Program Development Tool.exe' startup file. After selecting the directory, the project can run normally.
4. Missing plugins, components, or excessively long dependency installation
If the above three problems occur—missing plugins, missing components, or an initial dependency installation time that is too long (generally exceeding 3-5 minutes is abnormal)—reinstalling everything will fix all of these situations.
5. No response when clicking HBuilderX
Solution: Open the computer's Task Manager, find all HBuilderX-related background processes, manually end all of them, then reopen the software and run the project again to restore normal operation.
6. Environment variable issues
Cause of the problem: The user modified the TEMP environment variable to the D drive, causing cli.js to generate directories incorrectly. HBuilderX is hardcoded to read files from the C drive, leading to a mismatch. Please check if the TEMP environment variable is set to its original value.