Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ReadB opened this issue Jan 15, 2024 · 1 comment · Fixed by #4284
Closed

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

ReadB opened this issue Jan 15, 2024 · 1 comment · Fixed by #4284
Labels
kind/bug Something isn't working status/done

Comments

@ReadB
Copy link

ReadB commented Jan 15, 2024

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

@ReadB ReadB added kind/bug Something isn't working status/triage labels Jan 15, 2024
@siddhsuresh
Copy link
Member

thanks for the issue @ReadB!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working status/done
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants