When the server does not start with rails s

Overview

Webpacker::Manifest::MissingEntryError We hope that it will be useful as a solution when such an error occurs.

environment

Mac OS Catarina 10.15.7 rails 6.0 series ruby 2.6.5

Error statement

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:

image.png

What I tried

  1. Install webpack
  2. Check if yarn is included
  3. yarn upgrade
  4. Start the server with ./bin/webpack-dev-server

If you delete the js-reading description of application.html.erb, the error disappears, but ** js cannot be read. ** **

solution

An error occurred because the version of node is different.

The goal is to match the node version and make sure the server starts up.

Solution flow

  1. Node version check
  2. Remove / reinstall to downgrade node
  3. Node version check
  4. If the installed node is not reflected, put it in the PATH
  5. Install Webpacker
  6. If you get an error that yarn is needed, yarn install
  7. Install Webpacker again
  8. Start the server and check

Details

*** 1. Node version check 2. Remove / reinstall to downgrade node 3. Node version check ***

Terminal


% node -v
% brew uninstall --ignore-dependencies nodejs
% brew install node@14
% node -v

*** 4. If the installed node is not reflected, put it in the PATH ***

Terminal


% vim ~/.zshrc 
% source ~/.zshrc

vim


export PATH="/usr/local/opt/node@14/bin:$PATH" 

*** 5. Install Webpacker ***

Terminal


% rails webpacker:install

*** 6. If you get an error that yarn is required yarn install ***

Terminal



========================================
  Your Yarn packages are out of date!
  Please run `yarn install --check-files` to update.
========================================

Terminal


% yarn install

*** 7. Try installing Webpacker again ***

Terminal


% rails webpacker:install

*** 8. Start the server and check ***

Terminal


% rails s

Summary

--Yarn is required to install Webpacker. --It may happen that it cannot be read due to the difference in version.

Recommended Posts

When the server does not start with rails s
About the problem that the server can not be started with rails s
Container does not start with docker-compose
How to get the log when install4j does not start
The story when the container does not start up with docker-compose up and an error occurs
[Rails] Video does not play with video_tag
What I did when the DB did not start with docker-compose up
[Rails] What to do when rails s does not respond or does not stop
[NetBeans] Story when it does not start
When the server fails to start in Eclipse
[Rails 6] RuntimeError with $ rails s
Rails server doesn't start.
Quickly solve A server is already running (rails s process does not break)
What to do when rails db: seed does not reflect in the database
[Grails] Error occurred running What to do when the Grails CLI does not start
What to do when is invalid because it does not start with a'-'
Bundle install with docker + rails6 does not reflect gem
[Note] When the page access speed does not increase
[Railways] Railways does not work when the RubyMine project root is other than the Rails root directory.
Many error lines ... Rails server does not start 2. "Autodetect': Could not find a JavaScript runtime."
The story when the test folder was not created in Rails
[Ruby on Rails] When parameter id acquisition does not work
[Rails] The problem that pry-byebug does not stop through breakpoints
[Rails] Solving the problem that session timeout does not work
[Rails] When the layout change of devise is not reflected
[Beginner] When rails s doesn't work
Docker test DB does not start
How to fix the problem that Aptana Studio does not start
Remedy for "A server is already running." Error when running rails s
[MySQL] The database server built with docker may not support Japanese ...
Connect to Rails server with iPhone
What to do if the app is not created with the latest Rails version installed when rails new
[Rails] "pry-rails" that can be used when saving with the create method
rails c does not start and a lot of line errors appear
When the form such as Select of Materialize does not work properly
[rails] The case where the server stopped working
Spring Boot 2.0.0 does not start built-in tomcat
Prepare the format environment with "Rails" (VScode)
JavaScript (vanilla) does not respond in Rails.
MySQL container does not start in Docker
Change the layout when rotating with onConfigurationChanged
[Rails] [Memo] When to add = to <%%> and when not
Check the processing contents with [rails] binding.pry
How to deal with FATAL: role "admin0" does not exist and PG :: ConnectionBad: FATAL: role "admin0" does not exist when executing rails db: create
What to do if you get an "A server is already running." Error when you try to start the rails server
File manager does not start when logging in again in Docker's LXDE desktop environment
[Rails] When transitioning to a page with link_to, move to the specified location on the page
I wanted to start the AP server and debug with just the Maven command
What to do when ‘Could not find’ in any of the sources appears in the development environment with Docker × Rails × RSpec
I rewrote the Rails tutorial test with RSpec
[Rails] When I use form_with, the screen freezes! ??
Start SQL Server with Docker & register initial data
[Rails] Error resolution when generating tokens with PAYJP
When the Ruby on Rails terminal rolls back
Unicorn timeout (61s> 60s), killing does not kill workers
Does the escape sequence (\) not work? (for Mac)
When @Transactional of Spring Boot does not work
Final confirmation when ruby version does not switch
rails new app is not created with app name
Eclipse does not start after Java 11 is installed
Implement the Like feature in Ajax with Rails.