You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix generator test failures by skipping validation and using exact versions
This commit fixes two issues that were causing generator tests to fail:
1. Version validation running during generator execution
- The engine initializer was validating npm package installation
- But generators hadn't installed packages yet (chicken-and-egg problem)
- Solution: Skip validation when Rails generators are running
2. Package installed with semver range instead of exact version
- package_json gem was adding packages with carets (^16.1.1)
- React on Rails requires exact version matching between gem and npm package
- Solution: Use npm install --save-exact directly for react-on-rails package
Changes:
- lib/react_on_rails/engine.rb: Skip validation during generator runs
- lib/generators/react_on_rails/install_generator.rb: Use --save-exact flag
Note: Filed issue with package_json gem to add exact version support:
shakacode/package_json#25
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments