Skip to content

pre-commit ts-lint fails in pipeline #2351

@toti1212

Description

@toti1212

describe your issue

I was running my pipeline on Bitbucket and one step is to run the pre-commit we have configured.
Without changes, this starts failing.

The issue seems to be with the pre-commit-tslint

+ pre-commit run --all-files
[INFO] Initializing environment for https://github.com/psf/black.
[INFO] Initializing environment for https://github.com/psf/black:click==8.0.4.
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for https://github.com/maximevast/pre-commit-tslint/.
[INFO] Initializing environment for https://github.com/maximevast/pre-commit-tslint/:tslint-react@4.1.0,tslint@5.20.1,typescript@4.0.2.
[INFO] Installing environment for https://github.com/psf/black.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/maximevast/pre-commit-tslint/.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/root/.cache/pre-commit/repo1234/node_env-default/bin/node', '/root/.cache/pre-commit/repo1234/node_env-default/bin/npm', 'install', '--dev', '--prod', '--ignore-prepublish', '--no-progress', '--no-save')
return code: 1
expected return code: 0
stdout: (none)
stderr:
    /root/.cache/pre-commit/repo1234/node_env-default/bin/node: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by /root/.cache/pre-commit/repo1234/node_env-default/bin/node)
    /root/.cache/pre-commit/repo1234/node_env-default/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /root/.cache/pre-commit/repo1234/node_env-default/bin/node)
    /root/.cache/pre-commit/repo1234/node_env-default/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /root/.cache/pre-commit/repo1234/node_env-default/bin/node)
    
Check the log at /root/.cache/pre-commit/pre-commit.log

I don't know if anyone knows if there is anything related to this.

pre-commit --version

pre-commit 2.17.0

.pre-commit-config.yaml

exclude: "docs|node_modules|migrations|.git|.tox"
default_stages: [commit]
fail_fast: true

repos:
  - repo: https://github.com/psf/black
    rev: 22.1.0
    hooks:
      - id: black
        additional_dependencies: ['click==8.0.4']
        language_version: python3
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v2.4.0
    hooks:
      - id: flake8
  - repo: https://github.com/awebdeveloper/pre-commit-tslint
    rev: v0.0.2
    hooks:
      - id: tslint
        additional_dependencies:
          ["tslint@5.20.1", "typescript@4.0.2", "tslint-react@4.1.0"]
        files: frontend/src/.*\.(tsx|ts)
        args: ["--project","frontend/tsconfig.json", "--config", "frontend/tslint.json", "--fix"]

~/.cache/pre-commit/pre-commit.log (if present)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions