Common Errors & Solutions - powerhome/playbook GitHub Wiki

ERROR: Missing Manifest error in browser

Error:

# Error displayed in browser
Description:
Webpacker::Manifest::MissingEntryError at /kits/button
Webpacker can't find main in /home/app/src/lib/../public/packs/manifest.json.

Missing Manifest Error

Solution #1

This error is most often seen if you try to load http://localhost:8089 in the browser before webpacker has finished compiling assets.

Make sure to wait for your terminal to display Compiled Successfully as the last line before loading in browser window.

Solution #2

If you are waiting for Compiled Successfully, but instead see:

webpacker_1  | bash: line 1:     9 Killed                  ./bin/webpack-dev-server
playbook_webpacker_1 exited with code 137

You may need to increase your docker memory allocation from the default. Suggested is to increase to 6GB.

Solution #3

If you did wait for terminal to display Compiled Successfully, but still see the error in your browser...

Open terminal, and scroll up. Do you see a lot of SCSS errors referring to node-sass requiring a rebuild or Node Sass could not find a binding?

# In terminal run the following commands
$ docker-compose run web npm rebuild node-sass

ERROR: Rebuild Node-Sass error

Error:

# Error displayed in terminal
$ webpacker_1  | Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 8.x
$ webpacker_1  |
$ webpacker_1  | Found bindings for the following environments:
$ webpacker_1  |   - OS X 64-bit with Node.js 8.x
$ webpacker_1  |
$ webpacker_1  | This usually happens because your environment has changed since running `npm install`.
$ webpacker_1  | Run `npm rebuild node-sass` to download the binding for your current environment.

Solution:

# In terminal run the following commands
$ docker-compose run web npm rebuild node-sass

ERROR: Server Already Running, PID error

Solution:

# In terminal run the following commands
$ make shell
$ rm /home/app/src/spec/dummy/tmp/pids/server.pid
$ exit
$ make start

ERROR: Can't find clean-webpack-plugin or can't find webpack-dev-server

# Error displayed in terminal
$ webpacker_1  | can't find clean-webpack-plugin
# Error displayed in terminal
$ webpacker_1  | can't find webpack-dev-server

Solution

# In terminal run the following commands
$ docker-compose run web yarn

Error: No space left on device

# Error displayed in terminal
ERROR: Service 'web' failed to build: Error processing (...): no space left on device

Solution

# In terminal run the following commands
$ docker system prune
WARNING! This will remove:
        - all stopped containers
        - all networks not used by at least one container
        - all dangling images
        - all dangling build cache
Are you sure you want to continue? [y/N]

Type "y" and enter

ERROR: webpack-dev-server not found

# Error displayed in terminal
$ webpack-dev-server not found

Solution

# In terminal run the following commands
$ yarn && bundle install

Error Corrupted Database

FATAL:  database files are incompatible with server
DETAIL:  The data directory was initialized by PostgreSQL version 11, which is not compatible with this version 10.6 (Debian 10.6-1.pgdg90+1)

Corrupted Database Error

Solution

docker-compose down —volume
docker volume rm playbook_database
docker-compose up —build

Open a new tab and run

docker-compose run —rm web bin/rails db:create db:migrate

Application/ Packs responds with 404

Application Packs 404

If you already tried removing your node modules, clearing cache, and reinstalling

rm -rf node_modules && yarn cache clean

You most likely have a Web-Pack server running that didn't close.

Solution

Kill your PIDs runnning on port:3035

lsof -wni tcp:3035
kill -9 [PID Number without brackets]

Webpacker cannot create container

Creating playbook_webpacker_1 ... error

Recreating playbook_web_1     ... done
available

ERROR: for webpacker  Cannot create container for service webpacker: Range of CPUs is from 0.01 to 3.00, as there are only 3 CPUs available
ERROR: Encountered errors while bringing up the project.
make[1]: *** [start] Error 1
make: *** [it] Error 2

Solution

Run make stop, docker system prune, then make it