blitz-js / blitz

⚡️ The Missing Fullstack Toolkit for Next.js
https://Blitzjs.com
MIT License
13.68k stars 798 forks source link

material ui recipe hangs #4007

Closed Vandivier closed 1 year ago

Vandivier commented 1 year ago

What is the problem?

when I blitz install material-ui the CLI hangs on the final step when it says Generating file diff... and the process never* exits.

*i think i actually waited 20 min

Paste all your error logs here:

n/a

Paste all relevant code snippets here:

n/a

What are detailed steps to reproduce this?

video here https://www.youtube.com/watch?v=BsVyDgDImlc

multiple ways to generate, but one scenario would be:

  1. blitz new foobar
  2. setup with TS, full, final form
  3. blitz install material-ui

Run blitz -v and paste the output here:

note: I installed blitz via yarn global add blitz so the npm manager is a touch misleading...although yarn itself is installed via npm so it says that...

Blitz version: 2.0.0-beta.19 (global)
Blitz version: 2.0.0-beta.19 (local)
Windows 10 | win32-x64 | Node: v16.17.0

 Package manager: npm

  System:
    OS: Windows 10 10.0.19045
    CPU: (4) x64 Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz
    Memory: 9.92 GB / 19.86 GB
  Binaries:
    Node: 16.17.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 7.20.6 - C:\Program Files\nodejs\npm.CMD
  npmPackages:
    @blitzjs/auth: 2.0.0-beta.19 => 2.0.0-beta.19
    @blitzjs/next: 2.0.0-beta.19 => 2.0.0-beta.19
    @blitzjs/rpc: 2.0.0-beta.19 => 2.0.0-beta.19
    @prisma/client: 4.6.0 => 4.6.0
    blitz: 2.0.0-beta.19 => 2.0.0-beta.19
    next: 12.2.5 => 12.2.5
    prisma: 4.6.0 => 4.6.0
    react: 18.2.0 => 18.2.0
    react-dom: 18.2.0 => 18.2.0
    typescript: ^4.8.4 => 4.9.4

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

possibly important note that i'm using git bash on windows 10 inside of vs code

image where it's hanging:

image

Vandivier commented 1 year ago

recipe is importing from next so i don't think it's build against the legacy blitz framework, it's beta-compatible.

import Document, {
  NextScript,
  DocumentContext,
  Head,
  DocumentInitialProps,
  Html,
  Main,
} from "next/document"

^ snippet from recipe

so, this recipe code should be updated IMO: .setRepoLink("https://github.com/blitz-js/legacy-framework") should point to new repo

dillondotzip commented 1 year ago

Hey @Vandivier we should definitely update this. I believe part of the issue is that the new default for blitz apps is to use the src directory. Thankfully there is a PR open to help determine if you're using src or app directory. Once we get that merged, we can use the helper and update all the recipes https://github.com/blitz-js/blitz/pull/3997

jelling commented 1 year ago

What's the recommended path for installing material-ui at this point? I tried the recipe but things did not work out of the box.

siddhsuresh commented 1 year ago

Hey @jelling could you specify the error you are facing with the recipe, is it the same as mentioned in this issue? so that it can be fixed ASAP.

Vandivier commented 1 year ago

idk if the issue is still technically ongoing as of current versions (i think yes it's still out of date)

but, pretty easy to add material without the recipe. ChatGPT can walk devs through it 💪