Skip to content

fails on Debian 12 #3182

Closed
Closed

Description

@LeSpocky

Just added this to my .pre-commit-config.yaml:

  - repo: https://github.com/renovatebot/pre-commit-hooks
    rev: 41.9.0
    hooks:
      - id: renovate-config-validator
        args: [--strict]

Then ran pre-commit run -a and it fails like this:

% pre-commit run -a
[INFO] Initializing environment for https://github.com/renovatebot/pre-commit-hooks.
[INFO] Initializing environment for https://github.com/renovatebot/pre-commit-hooks:renovate@41.9.0.
[INFO] Installing environment for https://github.com/renovatebot/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/usr/bin/python3', '-mnodeenv', '--prebuilt', '--clean-src', '/home/adahl/.cache/pre-commit/repolreaekxz/node_env-lts', '-n', 'lts')
return code: 1
stdout: (none)
stderr:
    /usr/lib/python3/dist-packages/nodeenv.py:24: DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13
      import pipes
     * Install node (ltsTraceback (most recent call last):
      File "<frozen runpy>", line 198, in _run_module_as_main
      File "<frozen runpy>", line 88, in _run_code
      File "/usr/lib/python3/dist-packages/nodeenv.py", line 1042, in <module>
        main()
      File "/usr/lib/python3/dist-packages/nodeenv.py", line 890, in main
        create_environment(env_dir, opt)
      File "/usr/lib/python3/dist-packages/nodeenv.py", line 731, in create_environment
        install_node(env_dir, src_dir, opt)
      File "/usr/lib/python3/dist-packages/nodeenv.py", line 594, in install_node
        node_url = get_node_src_url(opt.node, get_node_src_url_postfix(opt))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3/dist-packages/nodeenv.py", line 469, in get_node_src_url
        if parse_version(version) > parse_version("0.5.0"):
           ^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3/dist-packages/pkg_resources/_vendor/packaging/version.py", line 266, in __init__
        raise InvalidVersion(f"Invalid version: '{version}'")
    pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: 'lts'
    
Check the log at /home/adahl/.cache/pre-commit/pre-commit.log

Note: using Debian GNU/Linux 12 (bookworm) here, and pre-commit is installed as usual through apt package manager, thus version is pre-commit 3.0.4.

Activity

  1. locked and limited conversation to collaborators on Jun 28, 2025
  2. converted this issue into a discussion #3195 on Jun 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Datasource

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions