Skip to content

yarn rw build web requires @redwoodjs/api-server #2299

@jeliasson

Description

@jeliasson

Issue
In a serverful Docker deployment I have one Dockerfile for web and one Dockerfile for api. However, the web seems to require that the api directory is being copied in to the image in order to be able to run yarn rw build web.

Example

FROM node:14 as builder

COPY web web
COPY .nvmrc .
COPY babel.config.js .
COPY graphql.config.js .
COPY package.json .
COPY redwood.toml .
COPY yarn.lock .

# Install dependencies
RUN yarn install --frozen-lockfile

# Build
RUN yarn rw build web

# [...]

Error
image

I think it's because the root package.jsons dependency to @redwoodjs/cli which has a dependency later to @redwoodjs/api-server. Not sure.

Anyone want to help me understand why this is, and how one can remove this dependency for web builds?

Thanks!

/cc @dac09 @peterp

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions