LoginSignup
1
0

More than 1 year has passed since last update.

railsアプリをherokuにデプロイしようとして、 error Command "webpack" not found.が出た時の対処法

Last updated at Posted at 2022-12-16

結論

・webpackerを最新のものにする

エラーが出た時のGemfileはこんな感じでした。

Gemfile

gem 'webpacker', '~> 4.0'

それを

gem 'webpacker', '~> 5.0'

に変更して

bundle update
bundle install
bundle exec rails webpaker:install

この時にconflictが出る時がありますが、それは全部yを入力して無視して大丈夫でした。

ここまできたら再度herokuにデプロイ。

git add -A
git commit -m "update webpacker"
git push
git push heroku main:main

これで解決。

参考サイト

Rails 'error Command "webpack" not found.'について

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0