Skip to content

When building alongside the project in version 11.10.2 collaborative-editing will error because of zod dependency. #235

@VincentKempers

Description

@VincentKempers

Extension

Collaborative Editing

Describe the Bug

When creating a docker file and including the packages it will error out on the dependency of zod.
This seems to be due to the recent changes in version 11.10.2 where the dependency has been updated to version 4.x.x and seems to not work/conflict with the version of zod that is being used in the collaborative editing package (version "^3.24.4").

To Reproduce

Create a dockerfile e.g:

FROM directus/directus:11.10.2

USER root
RUN corepack enable

USER node

RUN pnpm install \
@directus-labs/seo-plugin \
@directus-labs/collaborative-editing@1.1.0 

when building the docker file everything seems fine.
but when you run your created image:

docker run <image>

It will return the error:

file:///directus/node_modules/.pnpm/zod@4.0.14/node_modules/zod/v4/core/schemas.js:865
    const first = def.options[0]._zod.run;
                                      ^

TypeError: Cannot read properties of undefined (reading 'run')

Directus Version

v11.10.2

Hosting Strategy

Self-Hosted (Docker Image)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions