blitz-js / blitz

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

blitz new --no-git causes npm install of husky to fail #3950

Closed dennisjbell closed 1 year ago

dennisjbell commented 2 years ago

What is the problem?

If you chose the --no-git option for blitz new operator, it will still try to install husky:

npm

 ERR!

command

 sh -c husky install

Paste all your error logs here:

6682 verbose stack Error: command failed
6682 verbose stack     at ChildProcess.<anonymous> (/Users/dennis.bell/.nvm/versions/node/v16.13.1/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27
6682 verbose stack     at ChildProcess.emit (node:events:390:28)
6682 verbose stack     at maybeClose (node:internal/child_process:1064:16)
6682 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
6683 verbose pkgid positive-ist@1.0.0
6684 verbose cwd /Users/dennis.bell/Developer/clients/RS/github.com/RubidiumStudios/POSitive/positive-ist
6685 verbose Darwin 21.6.0
6686 verbose argv "/Users/dennis.bell/.nvm/versions/node/v16.13.1/bin/node" "/Users/dennis.bell/.nvm/versions/node/v16.13.1/bin/npm" "install" "--loglevel=error"
6687 verbose node v16.13.1
6688 verbose npm  v8.1.2

Paste all relevant code snippets here:

PASTE_HERE (leave the ``` marks)

What are detailed steps to reproduce this?

  1. Run blitz new my-blitz-project --no-git

Run blitz -v and paste the output here:

Blitz version: 2.0.0-beta.16 (global)
macOS Monterey | darwin-arm64 | Node: v16.13.1

 Package manager: npm

  System:
    OS: macOS 12.5.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 82.63 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node
    Yarn: 1.22.18 - ~/.nvm/versions/node/v16.13.1/bin/yarn
    npm: 8.1.2 - ~/.nvm/versions/node/v16.13.1/bin/npm
  npmPackages:
    @blitzjs/auth: Not Found
    @blitzjs/next: Not Found
    @blitzjs/rpc: Not Found
    @prisma/client: Not Found
    blitz: Not Found
    next: Not Found
    prisma: Not Found
    react: Not Found
    react-dom: Not Found
    typescript: Not Found

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

No response

flybayer commented 2 years ago

Thanks for reporting this! Ready to work on :)