v1.0.1
Fix: CLI Setup Command Execution Issue
What's Fixed
This release addresses a critical bug in the Cerno CLI setup process that was preventing successful installation of Node.js dependencies during the initial project setup.
Bug Description
Users were experiencing setup failures when running ./cerno migrate --verbose or ./cerno setup, with the following symptoms:
- npm install command would fail with exit code 1
- Setup would abort with "Failed to install Node.js dependencies" error
- The issue occurred even when npm was properly installed and accessible
Resolution
Fixed in cerno_cli.py:
- Improved subprocess command execution - Resolved shell command handling inconsistencies that were causing npm commands to fail
- Enhanced error handling - Added better error messages and validation checks
- Added pre-flight validation - Now checks for frontend directory and package.json existence before attempting npm install
- Consistent cross-platform behavior - Unified command execution between Windows and Unix-based systems
Technical Details
The root cause was in the run_command() helper function, which was improperly mixing shell execution parameters with list-based commands. The fix includes:
-
Cleaner subprocess execution logic
- Proper handling of both list and string commands
- Removed conflicting shell parameter usage
- Better stdout/stderr redirection for quiet mode
-
Enhanced validation
- Checks for frontend directory existence
- Validates package.json presence before npm install
- More descriptive error messages for troubleshooting
-
Improved cross-platform compatibility
- Consistent command formatting across OS platforms
- Better handling of Windows-specific subprocess behavior
How to Update
Replace your existing cerno_cli.py file with the fixed version, or update your repository to the latest commit.
Additional Notes
If you previously experienced this setup issue:
- The fix should resolve the npm installation problems immediately
- You may need to clean your virtual environment and re-run setup if you have a partially installed state
- Ensure your frontend directory contains a valid package.json file
Full Changelog: See commit history for complete details. Shoutout to @RogerTangos for the issue report.
Feedback: If you encounter any issues with this fix, please report them in our GitHub issues.