Same case, got this error after addin a new subproject to monorepo (yarn-4.0.2). Run this command from root of monorepo
yarn install --refresh-lockfile