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
Skip version validation when package.json doesn't exist during setup (#1913)
This fixes an error that occurs when running `rake shakapacker:install`
on a fresh Rails application. The validation was introduced in commit
0d87ea7 and runs during Rails initialization via an `after_initialize`
hook.
The problem: `shakapacker:install` needs to load the Rails environment
before it can create package.json, but the version validation runs
during environment loading and fails because package.json doesn't exist yet.
The fix: Skip validation if package.json doesn't exist yet. This allows
installation tasks to complete successfully while still validating
versions on normal Rails application startup.
This issue was reported in CI logs where `rake shakapacker:install`
would fail with "package.json file not found" error.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <[email protected]>
0 commit comments