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

Pre-commit hook never finishes with pnpm run command #535

Open
dkzlv opened this issue Aug 11, 2023 · 2 comments
Open

Pre-commit hook never finishes with pnpm run command #535

dkzlv opened this issue Aug 11, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@dkzlv
Copy link
Member

dkzlv commented Aug 11, 2023

🔧 Summary

See title

Lefthook version

1.4.8 5d656f934507c221742509e79c65b1b77490f4a7

Steps to reproduce

@nanostores/query repo, main branch.

If I run pnpm test from console, it finishes in ~7s.

➜  nanoquery git:(main) time pnpm test
... lots of logs
pnpm test  7.39s user 1.09s system 267% cpu 3.169 total

Then try to change something and trigger pre-commit hook.

Expected results

It hangs indefinitely and never resolves.

Actual results

It should!

Possible Solution

Logs / Screenshots

Here's a video repro.

Screen.Recording.2023-08-11.at.16.57.41.mov
@dkzlv dkzlv added the bug Something isn't working label Aug 11, 2023
@dkzlv
Copy link
Member Author

dkzlv commented Aug 11, 2023

It was something related to size-limit. When I added --silent flag to it, all worked fine. I guess, I'll leave it opened, maybe it will be something of interest for you.

@mrexox
Copy link
Member

mrexox commented Aug 14, 2023

Hey! Thank you for the issue. Unfortunately I can't setup the project, it fails to find dist/nanoquery.umd.cjs

$ pnpm test

> @nanostores/query@0.2.4 test /tmp/query
> pnpm run /^test:/

. test:types$ tsc --noEmit && vitest typecheck --run
└─ Running...
. test:unit$ vitest run
└─ Running...
. test:size$ size-limit
│  ERROR  Error: Cannot find module '/tmp/query/dist/nanoquery.umd.cjs'
│ Require stack:
│ - /tmp/query/node_modules/.pnpm/size-limit@8.2.6/node_modules/size-limit/get-config.js
│ - /tmp/query/node_modules/.pnpm/size-limit@8.2.6/node_modules/size-limit/run.js
│ - /tmp/query/node_modules/.pnpm/size-limit@8.2.6/node_modules/size-limit/bin.js
│     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
│     at Function.resolve (node:internal/modules/cjs/helpers:108:19)
│     at /tmp/query/node_modules/.pnpm/size-limit@8.2.6/node_modules/size-limit/get-config.js:135:23
│     at Array.map (<anonymous>)
│     at getConfig (/tmp/query/node_modules/.pnpm/size-limit@8.2.6/node_modules/size-limit/get-config.js:128:21)
│     at async module.exports (/tmp/query/node_modules/.pnpm/size-limit@8.2.6/node_modules/size-limit/run.js:74:14)
└─ Failed in 157ms at /tmp/query
 ELIFECYCLE  Command failed with exit code 1.
 ELIFECYCLE  Test failed. See above for more details.

Not sure why this happens. I've run only pnpm install before pnpm test

I hope I'll be able to find the issue if I succeed with the project setup. Could you help me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants