prisma-labs / graphql-framework-experiment

Code-First Type-Safe GraphQL Framework
https://nexusjs.org
MIT License
675 stars 66 forks source link

Yarn 2 (Berry) support #1311

Open schickling opened 4 years ago

schickling commented 4 years ago

Perceived Problem

Currently nexus (aka Nexus Framework) can't be used with Yarn 2 ("Berry"). This is probably due to "assumptions" Nexus has about node_modules and where both generated artifacts and the Nexus CLI "binary" is expected to live.

Ideas / Proposed Solution(s)

Make Nexus work out-of-the-box with Yarn 2 🙃

trulysinclair commented 4 years ago

True, but there's a temporary workaround, yarn config set nodeLinker node_modules. I hope one day Nexus supports the yarn cache too, I'd recommend just putting everything into project-local directory, so that we also have workspaces support.

PS While that does solve the node_modules yarn still throws everything into a <workspaceRoot>/node_modules which is why workspaces aren't supported. Prisma also suffers from this issue, because it creates a <workspaceRoot>/node_modules/.prisma/client rather than a project-local modules folder..