Rails 6.1: Webpacker can't find application.js

Viewed 396

Installing a new application with rails 6.1.4. When running the application I get the following....

From browser:

Showing /home/james/ReachTech/app/views/layouts/application.html.erb where line #10 raised:

Webpacker can't find application.js in /home/james/ReachTech/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:
{
}
Extracted source (around line #10):
8
9
10
11
12
13
              

    <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
    <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
  </head>

  <body>

I am wanting to use javascript. Ive restarted the application multiple times. Any suggestions?

1 Answers

Please run this command

yarn install
Related