Skip to content

Routes in .blitz dir broken when using multiple apps in a monorepo #16

Open
@nickluger

Description

What is the problem?

Multiple apps in monorepo write to the same .blitz directory which is hoisted into the monorepo's top-level node_modules. The issue is also described here: #92, including a temporary workaround.

Paste all your error logs here:

No logs

Paste all relevant code snippets here:

No snippets

What are detailed steps to reproduce this?

  1. Create two blitz apps in a monorepo and yarn workspaces hoist your dependencies into a top-level node_modules.
  2. Run blitz codegen, inspect /node_modules/.blitz in one of the apps.
  3. Run in the other.

Run blitz -v and paste the output here:

macOS Big Sur | darwin-x64 | Node: v14.17.5

blitz: 0.41.1 (local)

  Package manager: npm
  System:
    OS: macOS 11.5.2
    CPU: (8) x64 Apple M1
    Memory: 154.82 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.5 - /var/folders/0t/qf92ltfx37jblv7t_3_7v8mh0000gn/T/yarn--1635001662121-0.45095447188894155/node
    Yarn: 1.22.17 - /var/folders/0t/qf92ltfx37jblv7t_3_7v8mh0000gn/T/yarn--1635001662121-0.45095447188894155/yarn
    npm: 6.14.15 - /var/folders/0t/qf92ltfx37jblv7t_3_7v8mh0000gn/T/fnm_multishells/46353_1634987771186/bin/npm
    Watchman: Not Found
  npmPackages:
    @prisma/client: Not Found
    blitz: 0.41.1 => 0.41.1
    prisma: Not Found
    react: Not Found
    react-dom: Not Found
    typescript: Not Found

Psst! the Not Found stuff happens when you use a monorepo, too.

Please include below any other applicable logs and screenshots that show your problem:

No response

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions