Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provides two more common errors (fix suggestions) for Webpacker::Manifest::MissingEntryError #3232

Merged
merged 3 commits into from
Dec 28, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions lib/webpacker/manifest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,14 @@ def manifest_type(pack_type)
def missing_file_from_manifest_error(bundle_name)
<<-MSG
Webpacker can't find #{bundle_name} in #{config.public_manifest_path}. 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.
1. You forgot to install node packages (try either `npm install` or `yarn install`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does npm install work with webpacker?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should but we never mentioned it anywhere so I suggest to remove it here too

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jasonfb this is good, but please remove the "npm" part.

@guillaumebriday I'll fix this if we don't hear from @jasonfb. This is a helpful fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi sorry I will finish this ASAP.

2. Your app has code with a non-standard extension (like a `.jsx` file) but the extension is not in the `extensions` config in `config/webpacker.yml`
3. You have set compile: false (see `config/webpacker.yml`) for this environment
(unless you are using the `webpack -w` or the webpack-dev-server, in which case maybe you aren't running the dev server in the background?)
4. webpack has not yet re-run to reflect updates.
5. You have misconfigured Webpacker's `config/webpacker.yml` file.
6. Your webpack configuration is not creating a manifest.

Your manifest contains:
#{JSON.pretty_generate(@data)}
MSG
Expand Down