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

Sparrow frontend fails to build in production #333

Open
davenquinn opened this issue Dec 21, 2023 · 0 comments
Open

Sparrow frontend fails to build in production #333

davenquinn opened this issue Dec 21, 2023 · 0 comments

Comments

@davenquinn
Copy link
Collaborator

Building frontend
[+] Building 4.8s (9/16)                                                                                                                                                       docker:default
 => [internal] load .dockerignore                                                                                                                                                        0.3s
 => => transferring context: 102B                                                                                                                                                        0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                     0.1s
 => => transferring dockerfile: 550B                                                                                                                                                     0.0s
 => [internal] load metadata for docker.io/library/node:16                                                                                                                               0.6s
 => importing cache manifest from ghcr.io/earthcubegeochron/sparrow/frontend:3.1.0                                                                                                       0.0s
 => [internal] load build context                                                                                                                                                        0.1s
 => => transferring context: 15.76kB                                                                                                                                                     0.0s
 => [base 1/2] FROM docker.io/library/node:16@sha256:f77a1aef2da8d83e45ec990f45df50f1a286c5fe8bbfb8c6e4246c6389705c0b                                                                    0.0s
 => CACHED [base 2/2] WORKDIR /app/                                                                                                                                                      0.0s
 => CACHED [frontend 1/9] COPY package.json .                                                                                                                                            0.0s
 => ERROR [frontend 2/9] RUN yarn set version berry && npm install -g nodemon webpack                                                                                                    3.3s
------
 > [frontend 2/9] RUN yarn set version berry && npm install -g nodemon webpack:
2.268 ➤ YN0000: Retrieving https://repo.yarnpkg.com/4.0.2/packages/yarnpkg-cli/bin/yarn.js
2.824 ➤ YN0001: Error: Invalid semver version. yarn --version returned:
2.824 Usage Error: This tool requires a Node version compatible with >=18.12.0 (got 16.20.2). Upgrade Node, or set `YARN_IGNORE_NODE=1` in your environment.
2.824
2.824 Yarn Package Manager - 4.0.2
2.824
2.824   $ yarn <command>
2.824
2.824 You can also print more details about any of these commands by calling them with
2.824 the `-h,--help` flag right after the command name.
2.824     at /app/.yarn/releases/yarn-stable-temp.cjs:485:7900
2.824     at processTicksAndRejections (node:internal/process/task_queues:96:5)
2.824     at async $t.mktempPromise (/app/.yarn/releases/yarn-stable-temp.cjs:314:69436)
2.824     at async eO (/app/.yarn/releases/yarn-stable-temp.cjs:485:7635)
2.824     at async /app/.yarn/releases/yarn-stable-temp.cjs:485:4958
2.824     at async Function.start (/app/.yarn/releases/yarn-stable-temp.cjs:409:2384)
2.824     at async mu.execute (/app/.yarn/releases/yarn-stable-temp.cjs:485:4609)
2.824     at async mu.validateAndExecute (/app/.yarn/releases/yarn-stable-temp.cjs:345:664)
2.824     at async Gn.run (/app/.yarn/releases/yarn-stable-temp.cjs:359:2057)
2.824     at async Gn.runExit (/app/.yarn/releases/yarn-stable-temp.cjs:359:2241)
2.824 ➤ YN0000: Failed with errors in 0s 556ms
------
Dockerfile:9
--------------------
   7 |     COPY package.json .
   8 |
   9 | >>> RUN yarn set version berry && npm install -g nodemon webpack
  10 |
  11 |     # This is annoying but I don't see a better alternative
--------------------
ERROR: failed to solve: process "/bin/sh -c yarn set version berry && npm install -g nodemon webpack" did not complete successfully: exit code: 1
ERROR: Service 'frontend' failed to build : Build failed

I think this means that we need to upgrade Docker in our frontend image. But enhancing the frontend build process more generally might be useful.

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

1 participant