hotwired / hotwire-rails

Use Hotwire in your Ruby on Rails app
https://hotwired.dev
MIT License
971 stars 27 forks source link

You must either be running with node (package.json) or importmap-rails (config/importmap.rb) to use this gem. #41

Closed wuminzhe closed 3 years ago

wuminzhe commented 3 years ago
rails new new_project --skip-javascript # rails is 6.1.4
cd new_project
bundle add hotwire-rails # hotwire-rails is 0.1.3
rails hotwire:install

will output:

You must either be running with node (package.json) or importmap-rails (config/importmap.rb) to use this gem.
You must either be running with node (package.json) or importmap-rails (config/importmap.rb) to use this gem.
wuminzhe commented 3 years ago

fixed: install importmap-rails first

cobyism commented 3 years ago

fixed: install importmap-rails first

In case others run into this like I did and aren't sure how to proceed, it seems you need to install importmap-rails first: