90
61

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

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

Last updated at Posted at 2020-01-27

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

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

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?