Skip to content

Commit

Permalink
Fix undefined package_json during Yarn install
Browse files Browse the repository at this point in the history
When running rails stimulus_reflex:install on a new Rails app using
Yarn, the following error is raised:

  --- [yarn] ----
  rails aborted!
  NameError: undefined local variable or method `package_json'
  for #<Rails::Generators::AppGenerator...

Looks like it's a missing update from
#655
  • Loading branch information
mattboldt committed Nov 26, 2023
1 parent aed8da1 commit 34a75d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/install/yarn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
dev = dev_package_list.exist? ? dev_package_list.readlines.map(&:chomp) : []
drop = drop_package_list.exist? ? drop_package_list.readlines.map(&:chomp) : []

json = JSON.parse(package_json.read)
json = JSON.parse(package_json_path.read)

if add.present? || dev.present? || drop.present?

Expand Down

0 comments on commit 34a75d2

Please sign in to comment.