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 hooks fail #146

Closed
WeilerP opened this issue Jan 30, 2023 · 6 comments · Fixed by #142
Closed

Pre-commit hooks fail #146

WeilerP opened this issue Jan 30, 2023 · 6 comments · Fixed by #142
Labels
bug Something isn't working

Comments

@WeilerP
Copy link
Member

WeilerP commented Jan 30, 2023

Describe the bug

To Reproduce

Steps to reproduce the behavior (also fails with Python 3.10):

conda create -n pre_commit_issue-py39 python=3.9 --yes && conda activate pre_commit_issue-py39
pip install pre-commit
pre-commit install
pre-commit run --all-files
Traceback
[INFO] Installing environment for https://github.com/pre-commit/mirrors-prettier.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/.cache/pre-commit/repoy9_60zjb/node_env-default/bin/node', '/.cache/pre-commit/repoy9_60zjb/node_env-default/bin/npm', 'install', '--dev', '--prod', '--ignore-prepublish', '--no-progress', '--no-save')
return code: 1
stdout: (none)
stderr:
    /.cache/pre-commit/repoy9_60zjb/node_env-default/bin/node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /.cache/pre-commit/repoy9_60zjb/node_env-default/bin/node)
    /.cache/pre-commit/repoy9_60zjb/node_env-default/bin/node: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by /.cache/pre-commit/repoy9_60zjb/node_env-default/bin/node)
    /.cache/pre-commit/repoy9_60zjb/node_env-default/bin/node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /.cache/pre-commit/repoy9_60zjb/node_env-default/bin/node)
    /.cache/pre-commit/repoy9_60zjb/node_env-default/bin/node: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /.cache/pre-commit/repoy9_60zjb/node_env-default/bin/node)
    /.cache/pre-commit/repoy9_60zjb/node_env-default/bin/node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /.cache/pre-commit/repoy9_60zjb/node_env-default/bin/node)
    /.cache/pre-commit/repoy9_60zjb/node_env-default/bin/node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /.cache/pre-commit/repoy9_60zjb/node_env-default/bin/node)

I fixed it by setting the language_version of prettier in .pre-commit-config.yaml:

repos:
  - repo: https://github.com/pre-commit/mirrors-prettier
    rev: v2.6.2
    hooks:
      - id: prettier
        language_version: "17.9.1"
@WeilerP WeilerP added the bug Something isn't working label Jan 30, 2023
@Zethson
Copy link
Member

Zethson commented Jan 30, 2023

Same issue as scverse/cookiecutter-scverse#143

CC @grst

@Zethson
Copy link
Member

Zethson commented Jan 30, 2023

I'm still hoping that this gets fixed upstream sigh

@grst
Copy link
Contributor

grst commented Jan 30, 2023

This is not going to get fixed upstream: nodejs/node#42351
The latest node version won't run on systems with an old glibc.

@WeilerP, what OS are you on? We could pin an older node version in pre-commit, but I'm reluctant to do so if only outdated systems (e.g. ubuntu 18.04) require this.

@WeilerP
Copy link
Member Author

WeilerP commented Jan 30, 2023

Same issue as scverse/cookiecutter-scverse#143

Yes, sorry, forgot to mention it.

@WeilerP, what OS are you on?

I ran this on

LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.9.2009 (Core)
Release:        7.9.2009
Codename:       Core

@grst
Copy link
Contributor

grst commented Jan 30, 2023

ok, this is bad... centos7 is still supported until mid 2024 and probably still running on a lot of HPCs.

@Zethson, I'd be in favor of merging scverse/cookiecutter-scverse#144 then. WDYT?

@Zethson
Copy link
Member

Zethson commented Jan 30, 2023 via email

@Zethson Zethson linked a pull request Feb 20, 2023 that will close this issue
4 tasks
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

Successfully merging a pull request may close this issue.

3 participants