LoginSignup
87
61

More than 3 years have passed since last update.

Railsで1日以上詰まったエラー

Posted at

Railsを始めようとしたらさっそくエラーに遭遇

Railsを始めようとしたらエラーが出て丸一日なにも進みませんでした。
今日はそのエラーを共有します。

以下のようなエラーです

Webpacker::Manifest::MissingEntryError in hogehoge

Showing /Users/yuhiisk/Work/sites/smout/app/views/layouts/application.html.slim where line #10 raised:
Webpacker can't find application.js in /Users/yuhiisk/Work/sites/smout/public/packs/manifest.json. Possible causes:
1. You want to set webpacker.yml value of compile to true for your environment
unless you are using the `webpack -w` or the webpack-dev-server.
2. webpack has not yet re-run to reflect updates.
3. You have misconfigured Webpacker's config/webpacker.yml file.
4. Your webpack configuration is not creating a manifest.
Your manifest contains:
{
}

これはwebpackerがコンパイル*されていないことが原因です。

なので下記のコマンドで解決しました。

rails webpacker:install
rails webpacker:compile

ぜひ試してみてください!

87
61
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
87
61