Webpack failing in initial docker-compose

#6 · closed · 3 comments

View on GitHub ↗

mstibbard

## Issue The initial `docker-compose up --build` is failing to run webpack. The error log from Docker Desktop for hellophoenix_webpack_1 is below. ```bash yarn run v1.22.5 error Couldn't find a package.json file in "/app/assets" info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ``` ## Steps to reproduce Do the first 3 steps of "Running this app". 1. Clone repo 2. Duplicate the `.env` and `docker-compose.override.yml` files (and remove `.example` affix) 3. Run `docker-compose up --build` ## System details M1, macOS v11.4 Docker Desktop 3.5.2 (66501) Node v14.17.0

Comments

nickjj

Hi, Did you change anything else about the project? Here's a link to the package.json file which does exist at `assets/package.json`: https://github.com/nickjj/docker-phoenix-example/blob/main/assets/package.json The tests are passing on CI (it builds everything and runs the test suite) and if I clone the repo and perform your steps I'm able to build things successfully, webpack runs and I'm able to see the site as it appears in the screenshot in the docs.

mstibbard

No it was a fresh clone, but I did reuse a project name that I had an old docker container for - I'm guessing that was the culprit. I've just cloned again and not getting the issue. Sorry about that.

nickjj

No problem. You can run a `docker-compose down` to delete old containers (and other resources) with the same name btw.