FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Remove usage of deprecated npm install option --ignore-prepublish · Issue #3517 · pre-commit/pre-commit · GitHub

Repository navigation

Remove usage of deprecated npm install option --ignore-prepublish #3517

Closed

Description

search you tried in the issue tracker

ignore-prepublish, npm

describe your actual problem

With #3516, I reported that pipelines we run in Gitlab-CI fail on an warning+error raised by npm at installation of markdownlint-cli by pre-commit.

Reading the execution log from related issue, it appears that:

  • npm raises a warning about the deprecated option --ignore-prepublish.

Analysis

The --ignore-prepublish option has been introduced by pre-commit 5 years ago.

However:

  • prepublish is marked as deprecated in NPM8 (but one can consider this has been the case for almost a decade).
  • currently, running installation of, say, markdownlint-cli raises the following warning in Gitlab-CI: Unknown cli config "--ignore-prepublish". This will stop working in the next major version of npm.

What is requested

In pre_commit/languages/node.py, the --ignore-prepublish option shall be either removed, or activable on a per-project basis if backward compatibility is somehow necessary (I know nothing about Node applications).

Some additional thoughts, here since I could find no other relevant place

I understand that non-actionable issues shall be closed. But closing #3516 without any way to improve/clarify the request or even only to comment is rude, considering preparation of such an issue takes time and tries to bring value to this project. Please consider allowing some delay before disallowing comments.

pre-commit --version

4.2.0

Activity

  1. asottile commented on Aug 19, 2025

    Member

    I understand that non-actionable issues shall be closed. But closing #3516 without any way to improve/clarify the request or even only to comment is rude, considering preparation of such an issue takes time and tries to bring value to this project. Please consider allowing some delay before disallowing comments.

    I mean your output literally said "report this to npm" and you decided to open the issue here? your issue was off topic to begin with, unhelpful (and far from "bringing value to the project"), and did not deserve further discussion.

    yes I locked it there was nothing more to discuss if you think that's rude you may want to adjust your expectations of what you're entitled to in open source

  2. ojob commented on Aug 19, 2025

    Author

    The comment at the bottom is not about the technical content of the first issue I opened today. It only proposes a way to handle exchange between humans, in a way that seems acceptable to me, hoping this would be a shared point of view.

    This issue is about updating pre-commit call to npm install, by removing a deprecated option.

  3. asottile commented on Aug 19, 2025

    Member

    This issue is about updating pre-commit call to npm install, by removing a deprecated option.

    then don't clutter this issue with your unnecessary commentary

  4. ojob commented on Aug 20, 2025

    Author

    After npm logs retrieval, it appears that the npm error is not raised due to the highlighted warning, which was not obvious from the recorder stderr. So I updated the issue description to be more specific.

  5. pyxelr commented on Oct 24, 2025

  6. asottile commented on Oct 24, 2025

    Member

    you're seeing a warning like the original post. but that is just a warning. warnings are not fatal.

  7. languitar commented on Jul 13, 2026

    This is now an actual error:

    pre_commit.util.CalledProcessError: command: ('.../bin/node', '/usr/sbin/npm', 'install', '--include=dev', '--include=prod', '--ignore-prepublish', '--no-progress', '--no-save')
    return code: 1
    stdout: (none)
    stderr:
        npm error code EUNKNOWNCONFIG
        npm error Unknown cli flag:
        npm error   - --ignore-prepublish
        npm error Run `npm help config` for supported options.
    
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL