Contributing: unable to resolve @directus modules

I’m attempting to fix a bug in the Directus codebase. I’ve started with running:

docker compose up
pnpm install

And thenpnpm --filter api test to run unit tests.

When I run pnpm --filter api test from the top-level directory, I get the following errors (and similar ones for other @directus-scoped packages):

Error: Failed to resolve entry for package "@directus/storage-driver-local". The package may have incorrect main/module/exports specified in its package.json.

If I cd into the api directory and run pnpm test I get the same errors.

If I go to (e.g.) packages/storage-driver-local and run pnpm test there, it works fine and all tests pass.

I seem to be missing a step to get imports of the @directus packages working correctly in my environment. Can someone help?

Are you on the latest version of pnpm when using pnpm install? We heavily rely on pnpm workspace and the new catalog feature, so an older version of pnpm might not play nicely here