GeezerVison is showing github.com — Remove usage of deprecated npm install option --ignore-prepublish · Issue #3517 · pre-commit/pre-commit
Remove usage of deprecated npm install option --ignore-prepublish #3517Descriptionsearch 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 Reacted by Paweł Cisło, hlovdal, Raphael Rösch, Patrick Marx, Johannes Wienke and Birger Johan Nordølum Activityasottile commented on Aug 19, 2025
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 ojob commented on Aug 19, 2025 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. asottile commented on Aug 19, 2025
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 Reacted by Ülgen Sarıkavak, Dhaval Gojiya, Josh J, Ziyu Wang, hlovdal, YuXuan Tay and Raven ojob commented on Aug 20, 2025 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. pyxelr commented on Oct 24, 2025 asottile commented on Oct 24, 2025 you're seeing a warning like the original post. but that is just a warning. warnings are not fatal. 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.
Reacted by Travis Illig, Jannis Mainczyk, Chris Herborth, Shane Frasier and ripssi
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|