blitz-js / blitz

⚡️ The Missing Fullstack Toolkit for Next.js

Home Page:https://Blitzjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to commit due to husky pre-commit hook missing prettier module

ReadB opened this issue · comments

What is the problem?

When trying to commit any changes to a new project in v2.0.2, the pre-commit hook fails.

Comparing a new project from 2.0.0-beta.35, package.json had the following devDependencies:

"prettier": "^2.7.1",
"prettier-plugin-prisma": "4.4.0",
"pretty-quick": "3.1.3",

Paste all your error logs here:

> git -c user.useConfigOnly=true commit --quiet
node:internal/modules/cjs/loader:1080
  throw err;
  ^

Error: Cannot find module 'prettier'
Node.js v18.18.2
husky - pre-commit hook exited with code 1 (error)

Paste all relevant code snippets here:

n/a

What are detailed steps to reproduce this?

  1. Run blitz new app
  2. Run cd app
  3. Run git commit

Run blitz -v and paste the output here:

Blitz version: 2.0.2 (global)
Blitz version: 2.0.2 (local)
Linux 5.19 | linux-x64 | Node: v18.18.2


 Package manager: npm

  System:
    OS: Linux 5.19 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (8) x64 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
    Memory: 3.72 GB / 15.50 GB
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 18.18.2 - ~/.nvm/versions/node/v18.18.2/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.18.2/bin/yarn
    npm: 9.8.1 - ~/.nvm/versions/node/v18.18.2/bin/npm
  npmPackages:
    @blitzjs/auth: 2.0.2 => 2.0.2 
    @blitzjs/next: 2.0.2 => 2.0.2 
    @blitzjs/rpc: 2.0.2 => 2.0.2 
    @prisma/client: 5.4.2 => 5.4.2 
    blitz: 2.0.2 => 2.0.2 
    next: 13.5.4 => 13.5.4 
    prisma: 5.4.2 => 5.4.2 
    react: 18.2.0 => 18.2.0 
    react-dom: 18.2.0 => 18.2.0 
    typescript: 4.8.4 => 4.8.4

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

No response

thanks for the issue @ReadB!