mooxl / astroad

A pre-configured setup for easy website development with Astro and Payload CMS using Docker.
MIT License
92 stars 8 forks source link

Development Environment Build Fails #153

Closed jaredtconnor closed 10 months ago

jaredtconnor commented 10 months ago

image

Hey there, I'm trying to build the project for the repo in the development format, and I'm getting Yarn issues and I'm not entirely sure how to track it down.

Node version: v21.4.0

It seems to be driven from Sharp dev dependency.

Is this being driven from the yarn.lock file in the frontend directory?

Error:

=> ERROR [payload base 4/5] RUN yarn install --frozen-lockfile                                                                                                                         15.3s
------
 > [payload base 4/5] RUN yarn install --frozen-lockfile:
0.451 yarn install v1.22.19
0.512 [1/4] Resolving packages...
0.753 [2/4] Fetching packages...
11.01 [3/4] Linking dependencies...
11.02 warning " > ts-node@10.9.1" has unmet peer dependency "@types/node@*".
11.04 warning Workspaces can only be enabled in private projects.
14.30 [4/4] Building fresh packages...
14.55 error /base/node_modules/sharp: Command failed.
14.55 Exit code: 1
14.55 Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
14.55 Arguments:
14.55 Directory: /base/node_modules/sharp
14.55 Output:
14.55 sharp: Installation error: Invalid Version: 1.2.4_git20230717
14.55 sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
14.55 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
------
failed to solve: process "/bin/sh -c yarn install --frozen-lockfile" did not complete successfully: exit code: 1
error Command failed with exit code 17.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
mooxl commented 10 months ago

Hey @jaredtconnor , it appears that the problem lies with the base image in the Payload Dockerfile. To resolve this issue, you can change it to FROM node:lts as base (using the non-alpine version). Commiting a fix for that...

jaredtconnor commented 10 months ago

Hey, @mooxl - that commit seemed to resolve it, full frontend and backend are building and serving on my end. Thank you for the quick turn around.