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 installation issue #119

Open
uweschmitt opened this issue Jun 7, 2024 · 4 comments
Open

pre-commit hook installation issue #119

uweschmitt opened this issue Jun 7, 2024 · 4 comments
Labels

Comments

@uweschmitt
Copy link

Installation does not work (anymore) for me:

$ pre-commit install-hooks
[INFO] Initializing environment for https://github.com/tbroadley/spellchecker-cli.
[INFO] Installing environment for https://github.com/tbroadley/spellchecker-cli.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/private/var/folders/k8/zfp7dvcs1m326gz1brql1tv80000gn/T/tmp.OtiZoO3D9a/repoghoa3jhv/node_env-system/bin/node', '/opt/homebrew/bin/npm', 'install', '-g', '/private/var/folders/k8/zfp7dvcs1m326gz1brql1tv80000gn/T/tmp.OtiZoO3D9a/repoghoa3jhv/> [email protected] prepack\n> tsc\n\n\n> [email protected] prepare\n> husky install\n\nhusky - Git hooks installed\nspellchecker-cli-6.1.1.tgz')
return code: 254
stdout: (none)
stderr:
    npm WARN tarball tarball data for file:/private/var/folders/k8/zfp7dvcs1m326gz1brql1tv80000gn/T/tmp.OtiZoO3D9a/repoghoa3jhv/> [email protected] prepack> tsc> [email protected] prepare> husky installhusky - Git hooks installedspellchecker-cli-6.1.1.tgz (null) seems to be corrupted. Trying again.
    npm WARN tarball tarball data for file:/private/var/folders/k8/zfp7dvcs1m326gz1brql1tv80000gn/T/tmp.OtiZoO3D9a/repoghoa3jhv/> [email protected] prepack> tsc> [email protected] prepare> husky installhusky - Git hooks installedspellchecker-cli-6.1.1.tgz (null) seems to be corrupted. Trying again.
    npm ERR! code ENOENT
    npm ERR! syscall open
    npm ERR! path /private/var/folders/k8/zfp7dvcs1m326gz1brql1tv80000gn/T/tmp.OtiZoO3D9a/repoghoa3jhv/> [email protected] prepack> tsc> [email protected] prepare> husky installhusky - Git hooks installedspellchecker-cli-6.1.1.tgz
    npm ERR! errno -2
    npm ERR! enoent ENOENT: no such file or directory, open '/private/var/folders/k8/zfp7dvcs1m326gz1brql1tv80000gn/T/tmp.OtiZoO3D9a/repoghoa3jhv/> [email protected] prepack> tsc> [email protected] prepare> husky installhusky - Git hooks installedspellchecker-cli-6.1.1.tgz'
    npm ERR! enoent This is related to npm not being able to find a file.
    npm ERR! enoent

    npm ERR! A complete log of this run can be found in: /Users/uweschmitt/.npm/_logs/2024-06-07T12_20_44_122Z-debug-0.log
Check the log at /private/var/folders/k8/zfp7dvcs1m326gz1brql1tv80000gn/T/tmp.OtiZoO3D9a/pre-commit.log

I had the same issue in a fresh docker image setup.

pre-commit.log

@uweschmitt
Copy link
Author

Looks like this is caused by [email protected]. Downgrading to [email protected] using npm i -g [email protected] solved the issue.

@tbroadley
Copy link
Owner

Thank you for reporting this! I'm glad that downgrading npm fixed it.

@mindlessroman I wonder if you'd be interested in investigating this. If not, no worries.

@mindlessroman
Copy link
Contributor

I'll try to take a peek in a little while!

@uweschmitt
Copy link
Author

Any updates? @mindlessroman ?

@tbroadley tbroadley added the bug label Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants