Skip to content

Docker compose for advanced-react-hooks fails #185

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

Closed
bradamr opened this issue Sep 6, 2022 · 4 comments
Closed

Docker compose for advanced-react-hooks fails #185

bradamr opened this issue Sep 6, 2022 · 4 comments

Comments

@bradamr
Copy link

bradamr commented Sep 6, 2022

I've had to use docker for all my modules thus far since node setup fails (I had an earlier ticket and it was mentioned as a bug within npm even though I've used nvm to try multiple node versions). The error I get with docker compose is:

➜ advanced-react-hooks git:(main) ✗ dcom up -d
Building node
[+] Building 9.9s (8/8) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 36B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/node:16 1.6s
=> [1/4] FROM docker.io/library/node:16@sha256:0c672d547405fe64808ea28b49c5772b1026f81b3b716ff44c10c96abf177d6a 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 8.10kB 0.0s
=> CACHED [2/4] WORKDIR /app 0.0s
=> CACHED [3/4] COPY . . 0.0s
=> ERROR [4/4] RUN NO_EMAIL_AUTOFILL=true node setup 8.3s

[4/4] RUN NO_EMAIL_AUTOFILL=true node setup:
#8 0.137 ▶️ Starting workshop setup...
#8 0.337 Running the following command: npx "https://gist.github.com/kentcdodds/bb452ffe53a5caa3600197e1d8005733" -q
#8 8.218 /tmp/npx-22540488.sh: 1: /tmp/npx-22540488.sh: workshop-setup: not found
#8 8.220 npm notice
#8 8.220 npm notice New minor version of npm available! 8.15.0 -> 8.19.1
#8 8.220 npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.19.1
#8 8.221 npm notice Run npm install -g [email protected] to update!
#8 8.221 npm notice


executor failed running [/bin/sh -c NO_EMAIL_AUTOFILL=true node setup]: exit code: 127
ERROR: Service 'node' failed to build : Build failed

Notes: dcom is an alias for docker-compose

@bradamr
Copy link
Author

bradamr commented Sep 6, 2022

I'm unable to continue my course from this so not sure what to do. Thanks!

@bradamr
Copy link
Author

bradamr commented Sep 6, 2022

I was able to get around this by modifying the Dockerfile:

COPY . .
RUN npm install -g [email protected]
RUN NO_EMAIL_AUTOFILL=true node setup

I added the second line to update npm (which is mentioned in the earlier error)

@kentcdodds
Copy link
Member

Sounds like we should probably update the dockerfiles in all the repos to do that.

This breakage is due to an unfortunate bug that was released by npm and sadly the version of npm included in the docker image has that bug 🙁

@kentcdodds
Copy link
Member

@bradamr would you be at all interested in making that contribution to the repos?

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

No branches or pull requests

2 participants