Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Webpacker::Manifest::MissingEntryError in Admin#index #3

Closed
jmarc0k opened this issue May 31, 2018 · 5 comments
Closed

Webpacker::Manifest::MissingEntryError in Admin#index #3

jmarc0k opened this issue May 31, 2018 · 5 comments

Comments

@jmarc0k
Copy link

jmarc0k commented May 31, 2018

Error appears when directing to the Admin page on a Windows machine, the issue is related to webpack-dev-server not compiling the manifest files accordingly.

The application itself works on a regular 'rails s' though, but when going to the Admin page it will require a proper configuration or set up like using 'foreman start' or combining 'bundle exec rails s -p 3000' + './bin/webpack-dev-server --host 127.0.0.1' but turns out to be a Windows problem which spat out the following error.

`Showing C:/code/irc_app/app/views/admin.html.erb where line #27 raised:

Webpacker can't find admin/application.js in C:/code/irc_app/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:
    {
    "admin\application.js": "/packs/admin\application-ac1f63854cf901fd51fb.js",
    "admin\components\dashboard\index.js": "/packs/admin\components\dashboard\index-03825387d45ee20a6d7e.js",
    "admin\components\modals\chat.js": "/packs/admin\components\modals\chat-28bae40657ce63116d0b.js",
    "admin\components\musicians\_filters.js": "/packs/admin\components\musicians\_filters-f32493ec939ffaccd800.js",
    "admin\components\musicians\_form.js": "/packs/admin\components\musicians\_form-dba99d77e62719783268.js",
    "admin\components\musicians\edit.js": "/packs/admin\components\musicians\edit-08116779c3b45245605e.js",
    "admin\components\musicians\index.js": "/packs/admin\components\musicians\index-754e9ff50e2b12e9cf8b.js",
    "admin\components\musicians\new.js": "/packs/admin\components\musicians\new-a6cd0a7d5aaf04347c21.js",
    "admin\components\shared\_nav_top.js": "/packs/admin\components\shared\_nav_top-6a16fbfd1f096eccec78.js",
    "admin\components\shared\_pagination.js": "/packs/admin\components\shared\_pagination-35cb11b23a01308a5bfc.js",
    "admin\components\shared\_submit_tag.js": "/packs/admin\components\shared\_submit_tag-7440f1666801e1b724e3.js",
    "admin\components\users\_form.js": "/packs/admin\components\users\_form-48fec61fabbeb335126b.js",
    "admin\components\users\edit.js": "/packs/admin\components\users\edit-76f02ee9469e81272f8e.js",
    "admin\components\users\index.js": "/packs/admin\components\users\index-1aecd7b5d7a550c214e7.js",
    "admin\components\users\new.js": "/packs/admin\components\users\new-90be35b35ac37d70a252.js",
    "admin\event_bus.js": "/packs/admin\event_bus-2e548d7497d8fbbca4cd.js",
    "admin\filters\strings.js": "/packs/admin\filters\strings-f9fd0b025bcffa550ed6.js",
    "admin\helpers\index.js": "/packs/admin\helpers\index-7a7aa2efbde46ae225a6.js",
    "admin\routes.js": "/packs/admin\routes-19599d16ae40894f99d6.js",
    "admin\vuex\index.js": "/packs/admin\vuex\index-753a5e95cb382a657cb8.js",
    "admin\vuex\stores\chat_store.js": "/packs/admin\vuex\stores\chat_store-fb212eb67190f488dc30.js",
    "admin\vuex\stores\dashboard_store.js": "/packs/admin\vuex\stores\dashboard_store-7293d5e3d7a4118b477a.js",
    "admin\vuex\stores\musician_store.js": "/packs/admin\vuex\stores\musician_store-ce3d481cf756b8a618e4.js",
    "admin\vuex\stores\nav_top_store.js": "/packs/admin\vuex\stores\nav_top_store-2960487df4d448388d17.js",
    "admin\vuex\stores\user_store.js": "/packs/admin\vuex\stores\user_store-223a15345e905d328ddc.js",
    "application.js": "/packs/application-d0f678859343139f9aa9.js",
    "components\home\index.js": "/packs/components\home\index-27eb1e3b1afcfadd8c72.js",
    "components\musicians\index.js": "/packs/components\musicians\index-e3bed98d5e57f8f919af.js",
    "components\musicians\show.js": "/packs/components\musicians\show-19986831baab7cc841b5.js",
    "components\shared\_nav_top.js": "/packs/components\shared\_nav_top-7910aacbf4a415d65578.js",
    "filters\strings.js": "/packs/filters\strings-98482caecd1b92d6ccb2.js",
    "helpers\index.js": "/packs/helpers\index-e5d7d86395ddbd5fd898.js",
    "routes.js": "/packs/routes-478647596e01b7c95cde.js",
    "vuex\index.js": "/packs/vuex\index-2b72e3f3cf4e3007ec80.js",
    "vuex\stores\musician_store.js": "/packs/vuex\stores\musician_store-ca139dc023f56193f901.js"
    }`
@gbarillot
Copy link
Owner

Mmmh, are you booting the App using Foreman? It may be that you only start the Rails server but not the Webpack dev server.
If you can't / don't want to use Foreman, make sure to start both servers like this, each one in a separated console:

bundle exec rails s -p 3000
./bin/webpack-dev-server --host 127.0.0.1

Let me know if it helps

@jmarc0k
Copy link
Author

jmarc0k commented May 31, 2018

Hello, yes I ran that as well after originally trying the 'foreman start'

After the 'foreman start', I got the following error:

`
foreman start

C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/foreman-0.84.0/lib/foreman/process.rb:54:in spawn': Exec format error - ./bin/webpack-dev-server --host 127.0.0.1 (Errno::ENOEXEC) from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/foreman-0.84.0/lib/foreman/process.rb:54:in block in run'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/foreman-0.84.0/lib/foreman/process.rb:53:in chdir' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/foreman-0.84.0/lib/foreman/process.rb:53:in run'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/foreman-0.84.0/lib/foreman/engine.rb:366:in block (2 levels) in spawn_processes' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/foreman-0.84.0/lib/foreman/engine.rb:363:in upto'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/foreman-0.84.0/lib/foreman/engine.rb:363:in block in spawn_processes' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/foreman-0.84.0/lib/foreman/engine.rb:362:in each'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/foreman-0.84.0/lib/foreman/engine.rb:362:in spawn_processes' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/foreman-0.84.0/lib/foreman/engine.rb:57:in start'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/foreman-0.84.0/lib/foreman/cli.rb:42:in start' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in run'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in invoke_command' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in dispatch'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/base.rb:466:in start' from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/foreman-0.84.0/bin/foreman:7:in <top (required)>'
from C:/RailsInstaller/Ruby2.3.3/bin/foreman:22:in load' from C:/RailsInstaller/Ruby2.3.3/bin/foreman:22:in

'
`

P.S. I apologize for improper formatting in my posts

@gbarillot
Copy link
Owner

I'm afraid it has more to do with Rails Installer + Windows + Webpacker, and very little with the core of the app itself. Maybe you should try to create a super simple test app from scratch on your machine, then check if you still have this kind of problem with Webpack when you start the servers. Did you try any other Webpack / Rails 5 App before?

Unfortunately, I don't have any Windows machine to test it out, but it is interesting. Please keep us in touch if you have more information on this...

@jmarc0k
Copy link
Author

jmarc0k commented Jun 1, 2018

Yes, that was precisely my suspicious.

Along the way I've learned that it has something to do with compiler not being complied accordingly, it is either a 'foreman start' or those two 'bundle exec rails s -p 3000' + './bin/webpack-dev-server --host 127.0.0.1' but simply doesn't behave because it is a Windows machine.

For the sake of my time and headache, I decided to change my development environment to Linux by setting up a virtual machine and installing Ubuntu with it.

Now everything works smoothly.

@gbarillot
Copy link
Owner

May be related to rails/webpacker#245. Anyway, related to Windows/Rails/Webpack, not a Bug in the Demo App code, so I'm closing the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants