Skip to content

shakapacker:install writes wrong npm version (9.4.0) when gem is 9.5.0 #863

@AbanoubGhadban

Description

@AbanoubGhadban

Problem

When using shakapacker gem 9.5.0, running rake shakapacker:install writes "shakapacker": "9.4.0" to package.json instead of 9.5.0.

This causes the version mismatch error:

**ERROR** Shakapacker: Shakapacker gem and node package versions do not match
Detected: 9.4.0
     gem: 9.5.0

Steps to Reproduce

rails new myapp --skip-javascript
cd myapp
echo "gem 'shakapacker'" >> Gemfile
bundle install          # installs gem 9.5.0
rake shakapacker:install
cat package.json | grep shakapacker  # shows 9.4.0

Expected

package.json should have "shakapacker": "9.5.0" to match the gem.

Environment

  • shakapacker gem: 9.5.0
  • Rails: 7.x
  • Ruby: 3.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Metr-PendingPending Metr trackingp0Critical: blocks users, regressions, broken core functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions