René's URL Explorer Experiment


Title: 4.6.1 regression: local `language: node` hooks without `additional_dependencies` fail with `AssertionError` · Issue #3728 · pre-commit/pre-commit · GitHub

Open Graph Title: 4.6.1 regression: local `language: node` hooks without `additional_dependencies` fail with `AssertionError` · Issue #3728 · pre-commit/pre-commit

X Title: 4.6.1 regression: local `language: node` hooks without `additional_dependencies` fail with `AssertionError` · Issue #3728 · pre-commit/pre-commit

Description: search you tried in the issue tracker 4.6.1, "must have package.json or additional_dependencies" describe your issue Since v4.6.1, any repo: local hook using language: node without additional_dependencies fails to install its environment...

Open Graph Description: search you tried in the issue tracker 4.6.1, "must have package.json or additional_dependencies" describe your issue Since v4.6.1, any repo: local hook using language: node without additional_depen...

X Description: search you tried in the issue tracker 4.6.1, "must have package.json or additional_dependencies" describe your issue Since v4.6.1, any repo: local hook using language: node without additi...

Opengraph URL: https://github.com/pre-commit/pre-commit/issues/3728

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"4.6.1 regression: local `language: node` hooks without `additional_dependencies` fail with `AssertionError`","articleBody":"### search you tried in the issue tracker\n\n4.6.1, \"must have package.json or additional_dependencies\"\n\n### describe your issue\n\nSince v4.6.1, any `repo: local` hook using `language: node` without `additional_dependencies` fails to install its environment:\n\n```\nAn unexpected error has occurred: AssertionError: `language: node` must have package.json or additional_dependencies\n```\n\nThis worked in v4.6.0 and earlier. Hit in JupyterLab's release CI, where hooks like this one (running against the project's own node_modules) are common.\n\n#3719 changed `node.install_environment` to only use the prefix's `package.json` when `prefix.exists('.git')` is also true:\n\nhttps://github.com/pre-commit/pre-commit/blob/242ce8a25657be59f2770b50de41fe0fd508820d/pre_commit/languages/node.py#L76-L89\n\nBut for local repos the prefix comes from `store.make_local()` - the synthesized empty-template directory, which contains `empty_template_package.json` but is not a git repo. So `pkgs` is empty and the new assertion fires. Previously the dummy package was installed with plain `npm install -g .`, which succeeded.\n\n### pre-commit --version\n\n4.6.1\n\n### .pre-commit-config.yaml\n\n```yaml\nci:\n  # Same schedule interval as dependabot see .github/dependabot.yml\n  autoupdate_schedule: monthly\n  # skip any check that needs internet access\n  skip: [prettier, eslint, stylelint, shellcheck]\n\ndefault_language_version:\n  node: system\n\nrepos:\n  - repo: https://github.com/pre-commit/pre-commit-hooks\n    rev: v6.0.0\n    hooks:\n      - id: forbid-new-submodules\n      - id: end-of-file-fixer\n        exclude: galata/.*-snapshots\n      - id: check-case-conflict\n      - id: check-executables-have-shebangs\n      - id: requirements-txt-fixer\n      - id: check-added-large-files\n      - id: check-toml\n      - id: check-yaml\n      - id: debug-statements\n      - id: check-builtin-literals\n      - id: trailing-whitespace\n        exclude: .bumpversion.cfg\n      - id: check-merge-conflict\n      - id: check-symlinks\n      - id: mixed-line-ending\n\n  - repo: https://github.com/python-jsonschema/check-jsonschema\n    rev: 0.37.4\n    hooks:\n      - id: check-github-workflows\n\n  # Check zizmor version is aligned with the one in .github/workflows/zizmor.yml\n  - repo: https://github.com/zizmorcore/zizmor-pre-commit\n    rev: e3eebf65325ccc992422292cb7a4baee967cf815  # frozen: v1.26.1\n    hooks:\n      - id: zizmor\n        args: [\"--offline\"]\n\n  - repo: https://github.com/codespell-project/codespell\n    rev: v2.4.2\n    hooks:\n      - id: codespell\n        args:\n          - --ignore-words=.codespellignore\n          - --skip=docs/source/api/**,docs/source/getting_started/changelog.md\n        files: \\.(md|rst|txt)$\n\n  # Check ruff version is aligned with the one in pyproject.toml\n  - repo: https://github.com/astral-sh/ruff-pre-commit\n    rev: v0.15.20\n    hooks:\n      - id: ruff\n        args: [\"--fix\"]\n      - id: ruff-format\n\n  - repo: local\n    hooks:\n      - id: prettier\n        name: prettier\n        entry: jlpm\n        args: [run, 'prettier:files']\n        language: node\n        types_or: [json, ts, tsx, javascript, jsx, css]\n        exclude: \\.ipynb$\n      - id: eslint\n        name: eslint\n        entry: 'npm run eslint:files'\n        language: node\n        types_or: [ts, tsx, javascript, jsx]\n      - id: stylelint\n        name: stylelint\n        entry: 'npm run stylelint:files'\n        language: node\n        types: [css]\n      - id: shellcheck\n        name: shellcheck\n        entry: bash ./scripts/shellcheck_lint.sh\n        language: python\n        additional_dependencies: [shellcheck-py==0.11.0.1]\n        pass_filenames: false\n        files: \\.sh$\n      - id: integrity\n        name: integrity\n        entry: 'npm run integrity --force'\n        language: node\n        stages: [pre-push]\n```\n\n### ~/.cache/pre-commit/pre-commit.log (if present)\n\n_No response_","author":{"url":"https://github.com/krassowski","@type":"Person","name":"krassowski"},"datePublished":"2026-07-22T07:31:41Z","url":"https://github.com/pre-commit/pre-commit/issues/3728"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:481e547f-dd8a-9443-2008-ec4aeae770c7
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB5D6:EA06E:3FB5090:50E3D21:6B01FE31
html-safe-nonce8fcb39bff41670704e4405eb8d77997ab501cbad78330b992d41f7092d6c0b5b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNUQ2OkVBMDZFOjNGQjUwOTA6NTBFM0QyMTo2QjAxRkUzMSIsInZpc2l0b3JfaWQiOiIzNTk4NTk2OTIxMjE3OTA4MjczIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac9fd0238ee6d508701b88bcd2b3ef547fea282918ea8b836f74de32871485c9a9
hovercard-subject-tagissue:4946590950
github-keyboard-shortcutsrepository,issues,commits,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/pre-commit/pre-commit/3728/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2a04249932f8019ef60eaf7419f86f5d267835b9b62e64cd2fbe88381c07c444/pre-commit/pre-commit/issues/3728
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2a04249932f8019ef60eaf7419f86f5d267835b9b62e64cd2fbe88381c07c444/pre-commit/pre-commit/issues/3728
og:image:altsearch you tried in the issue tracker 4.6.1, "must have package.json or additional_dependencies" describe your issue Since v4.6.1, any repo: local hook using language: node without additional_depen...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamekrassowski
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
go-importgithub.com/pre-commit/pre-commit git https://github.com/pre-commit/pre-commit.git
octolytics-dimension-user_id6943086
octolytics-dimension-user_loginpre-commit
octolytics-dimension-repository_id17689377
octolytics-dimension-repository_nwopre-commit/pre-commit
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id17689377
octolytics-dimension-repository_network_root_nwopre-commit/pre-commit
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/pre-commit/pre-commit/issues/3728#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpre-commit%2Fpre-commit%2Fissues%2F3728
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpre-commit%2Fpre-commit%2Fissues%2F3728
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=pre-commit%2Fpre-commit
Reloadhttps://github.com/pre-commit/pre-commit/issues/3728
Reloadhttps://github.com/pre-commit/pre-commit/issues/3728
Reloadhttps://github.com/pre-commit/pre-commit/issues/3728
pre-commithttps://github.com/pre-commit
pre-commithttps://github.com/pre-commit/pre-commit
Codehttps://github.com/pre-commit/pre-commit
Issues17 (17)https://github.com/pre-commit/pre-commit/issues
Pull requests8 (8)https://github.com/pre-commit/pre-commit/pulls
Actionshttps://github.com/pre-commit/pre-commit/actions
Security and qualityhttps://github.com/pre-commit/pre-commit/security
Insightshttps://github.com/pre-commit/pre-commit/insights
https://github.com/pre-commit/pre-commit
New issuehttps://github.com/login?return_to=https://github.com/pre-commit/pre-commit/issues/3728
New issuehttps://github.com/login?return_to=https://github.com/pre-commit/pre-commit/issues/3728
4.6.1 regression: local language: node hooks without additional_dependencies fail with AssertionErrorhttps://github.com/pre-commit/pre-commit/issues/3728#top
https://github.com/krassowski
krassowskihttps://github.com/krassowski
on Jul 22, 2026https://github.com/pre-commit/pre-commit/issues/3728#issue-4946590950
#3719https://github.com/pre-commit/pre-commit/pull/3719
pre-commit/pre_commit/languages/node.pyhttps://github.com/pre-commit/pre-commit/blob/242ce8a25657be59f2770b50de41fe0fd508820d/pre_commit/languages/node.py#L76-L89
242ce8ahttps://github.com/pre-commit/pre-commit/commit/242ce8a25657be59f2770b50de41fe0fd508820d
https://github.com/samuel-esp
samuel-esphttps://github.com/samuel-esp
on Jul 22, 2026https://github.com/pre-commit/pre-commit/issues/3728#issuecomment-5044401507
https://github.com/caas-team/GoKubeDownscaler/actions/runs/29904556212/job/88879428539https://github.com/caas-team/GoKubeDownscaler/actions/runs/29904556212/job/88879428539
https://github.com/asottile
asottilehttps://github.com/asottile
on Jul 22, 2026https://github.com/pre-commit/pre-commit/issues/3728#issuecomment-5045155728
asottilehttps://github.com/asottile
completedhttps://github.com/pre-commit/pre-commit/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jul 22, 2026https://github.com/pre-commit/pre-commit/issues/3728#event-28329713484
Sign up for freehttps://github.com/signup?return_to=https://github.com/pre-commit/pre-commit/issues/3728
Sign in to commenthttps://github.com/login?return_to=https://github.com/pre-commit/pre-commit/issues/3728
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.