blitz-js / legacy-framework

MIT License
3 stars 2 forks source link

`blitz install material-ui` doesn't work #386

Closed exKAZUu closed 2 years ago

exKAZUu commented 2 years ago

What is the problem?

blitz install material-ui fails due to the following type errors.

Paste all your error logs here:

$ yarn blitz install material-ui
    TSError: ⨯ Unable to compile TypeScript:
    .blitz/recipe-install/index.ts:177:28 - error TS2345: Argument of type 'import("/Users/exkazuu/ghq/github.com/WillBooster/online
    -judge/.blitz/recipe-install/node_modules/ast-types/gen/namedTypes").namedTypes.ImportDeclaration' is not assignable to
    parameter of type 'import("/Users/exkazuu/ghq/github.com/WillBooster/online-judge/.blitz/recipe-install/node_modules/@blitzjs/in
    staller/node_modules/ast-types/gen/nodes").ImportDeclaration'.
      Types of property 'specifiers' are incompatible.
        Type '(ImportSpecifier | ImportNamespaceSpecifier | ImportDefaultSpecifier)[] | undefined' is not assignable to type
    '(ImportSpecifier | ImportNamespaceSpecifier | ImportDefaultSpecifier)[]'.
          Type 'undefined' is not assignable to type '(ImportSpecifier | ImportNamespaceSpecifier | ImportDefaultSpecifier)[]'.

    177         addImport(program, reactImport)
                                   ~~~~~~~~~~~
    .blitz/recipe-install/index.ts:180:26 - error TS2345: Argument of type 'import("/Users/exkazuu/ghq/github.com/WillBooster/online
    -judge/.blitz/recipe-install/node_modules/ast-types/gen/namedTypes").namedTypes.ImportDeclaration' is not assignable to
    parameter of type 'import("/Users/exkazuu/ghq/github.com/WillBooster/online-judge/.blitz/recipe-install/node_modules/@blitzjs/in
    staller/node_modules/ast-types/gen/nodes").ImportDeclaration'.

    180       addImport(program, serverStyleSheetsImport)
                                 ~~~~~~~~~~~~~~~~~~~~~~~
    .blitz/recipe-install/index.ts:206:26 - error TS2345: Argument of type 'import("/Users/exkazuu/ghq/github.com/WillBooster/online
    -judge/.blitz/recipe-install/node_modules/ast-types/gen/namedTypes").namedTypes.ImportDeclaration' is not assignable to
    parameter of type 'import("/Users/exkazuu/ghq/github.com/WillBooster/online-judge/.blitz/recipe-install/node_modules/@blitzjs/in
    staller/node_modules/ast-types/gen/nodes").ImportDeclaration'.

    206       addImport(program, cssBaselineImport)
                                 ~~~~~~~~~~~~~~~~~
    .blitz/recipe-install/index.ts:207:26 - error TS2345: Argument of type 'import("/Users/exkazuu/ghq/github.com/WillBooster/online
    -judge/.blitz/recipe-install/node_modules/ast-types/gen/namedTypes").namedTypes.ImportDeclaration' is not assignable to
    parameter of type 'import("/Users/exkazuu/ghq/github.com/WillBooster/online-judge/.blitz/recipe-install/node_modules/@blitzjs/in
    staller/node_modules/ast-types/gen/nodes").ImportDeclaration'.

    207       addImport(program, themeImport)
                                 ~~~~~~~~~~~
    .blitz/recipe-install/index.ts:337:28 - error TS2345: Argument of type 'import("/Users/exkazuu/ghq/github.com/WillBooster/online
    -judge/.blitz/recipe-install/node_modules/ast-types/gen/namedTypes").namedTypes.ImportDeclaration' is not assignable to
    parameter of type 'import("/Users/exkazuu/ghq/github.com/WillBooster/online-judge/.blitz/recipe-install/node_modules/@blitzjs/in
    staller/node_modules/ast-types/gen/nodes").ImportDeclaration'.

    337         addImport(program, reactImport)
                                   ~~~~~~~~~~~

Paste all relevant code snippets here:

Nothing.

What are detailed steps to reproduce this?

  1. blitz install material-ui

Run blitz -v and paste the output here:

I've confirmed that the errors occurred on both blitz 0.42.4 and 0.42.5-danger.2eab9f6f.21+2eab9f6f.

macOS Monterey | darwin-x64 | Node: v16.11.1

blitz: 0.42.4 (local)

  Package manager: yarn
  System:
    OS: macOS 12.0.1
    CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
    Memory: 403.05 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.11.1 - /private/var/folders/tj/9535q_6j1h55lgqwzlgg1mwc0000gn/T/xfs-8bd79637/node
    Yarn: 3.1.0 - /private/var/folders/tj/9535q_6j1h55lgqwzlgg1mwc0000gn/T/xfs-8bd79637/yarn
    npm: 8.0.0 - ~/.asdf/plugins/nodejs/shims/npm
    Watchman: 2021.10.18.00 - /usr/local/bin/watchman
  npmPackages:
    @prisma/client: 3.5.0 => 3.5.0
    blitz: 0.42.4 => 0.42.4
    prisma: 3.5.0 => 3.5.0
    react: 18.0.0-alpha-5ca4b0433-20211020 => 18.0.0-alpha-5ca4b0433-20211020
    react-dom: 18.0.0-alpha-5ca4b0433-20211020 => 18.0.0-alpha-5ca4b0433-20211020
    typescript: ~4.4 => 4.4.4
macOS Monterey | darwin-x64 | Node: v16.11.1

blitz: 0.42.5-danger.2eab9f6f.21+2eab9f6f (local)

  Package manager: yarn
  System:
    OS: macOS 12.0.1
    CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
    Memory: 174.20 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.11.1 - /private/var/folders/tj/9535q_6j1h55lgqwzlgg1mwc0000gn/T/xfs-9e20bf90/node
    Yarn: 3.1.0 - /private/var/folders/tj/9535q_6j1h55lgqwzlgg1mwc0000gn/T/xfs-9e20bf90/yarn
    npm: 8.0.0 - ~/.asdf/plugins/nodejs/shims/npm
    Watchman: 2021.10.18.00 - /usr/local/bin/watchman
  npmPackages:
    @prisma/client: 3.5.0 => 3.5.0
    blitz: 0.42.5-danger.2eab9f6f.21 => 0.42.5-danger.2eab9f6f.21+2eab9f6f
    prisma: 3.5.0 => 3.5.0
    react: 18.0.0-alpha-5ca4b0433-20211020 => 18.0.0-alpha-5ca4b0433-20211020
    react-dom: 18.0.0-alpha-5ca4b0433-20211020 => 18.0.0-alpha-5ca4b0433-20211020
    typescript: ~4.4 => 4.4.4

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

Related to blitz-js/legacy-framework#390 and blitz-js/blitz#2952 ?

beerose commented 2 years ago

Thanks for the report! I'm closing as a duplicate of https://github.com/blitz-js/blitz/issues/2957. It will get fixed with the new release, which should be today.

exKAZUu commented 2 years ago

Sorry for duplicated issue 😓

beerose commented 2 years ago

No problem!