Webpacker can't find application.js in manifest.json Follow
Answered
Hi!
I followed this tutorial https://www.jetbrains.com/help/ruby/create-and-run-your-first-project.html#create_rails_app
I wanted to print "Hello, Rails" like described but all I get is this:
Showing /Users/can/RubymineProjects/cancoel/app/views/layouts/application.html.erb where line #10 raised:
Webpacker can't find application.js in /Users/can/RubymineProjects/cancoel/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: { }
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
</head>
<body>
I use Version 3.0.3 via rbenv, Rails Version 6.1.4.4 and React JavaScript Library. I am on macOS Monterey 12.1.
How to solve this? Thank you!
Please sign in to leave a comment.
Hello,
have you tried running the following command?
Hi Olga!
It worked by commenting out the following line:
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
Does this help?
Which line do you mean? Does it work fine now?