Repository navigation
Description
Is there an existing issue for this?
- I have searched the existing issues
The closest reports have a different cause: #9796 (registry serving tarballs from a path outside the configured registry prefix) and the closed exemption fixes #9494 / #9548 / #9509. This one happens against the default registry.npmjs.org and only under --dry-run. #9187 is a separate --dry-run bug (side effects / output).
This issue exists in the latest npm version
- I am using the latest npm
This is not just a request to bump a dependency for a CVE
- This is not solely a request to bump a dependency for a CVE
Current Behavior
With npm 12's default allow-remote=none, npm install --dry-run refuses a registry-hosted tarball when the target package — or a package in its graph — declares bundleDependencies:
$ npm i --dry-run [email protected]
npm error code EALLOWREMOTE
npm error Fetching packages of type "remote" have been disabled
npm error Refusing to fetch "https://registry.npmjs.org/npm/-/npm-11.10.0.tgz"The identical command without --dry-run succeeds. The refused URL is a registry.npmjs.org tarball and registry is the default, so the registry-tarball exemption should apply.
| command | result |
|---|---|
npm i --dry-run [email protected] |
EALLOWREMOTE |
npm i [email protected] |
added 1 package |
npm i --dry-run @tailwindcss/[email protected] |
EALLOWREMOTE |
npm i @tailwindcss/[email protected] |
added 2 packages |
npm i --dry-run [email protected] (control, no bundleDependencies) |
added 1 package |
@tailwindcss/oxide is the realistic case: it bundles nothing itself, but its optional @tailwindcss/oxide-wasm32-wasi dep declares bundleDependencies — and since that package is cpu: ["wasm32"], a real install skips it entirely, which is presumably why only the dry-run path trips.
Practical impact: npm update --dry-run to preview a bump fails in any project whose tree contains such a package (anything on Tailwind 4, for instance), while the real npm update completes fine. In a monorepo that makes the preview unusable without --allow-remote=all, which is exactly the guard one doesn't want to relax to inspect a change.
Not caused by min-release-age: reproduces with --min-release-age=0 explicitly passed.
Expected Behavior
--dry-run should apply the same registry-tarball allow-remote exemption a real install does. Declaring bundleDependencies shouldn't cause a registry spec to be classified as type remote.
Steps To Reproduce
$ mkdir /tmp/eallowremote && cd /tmp/eallowremote && npm init -y
# both fail with EALLOWREMOTE
$ npm i --dry-run [email protected]
$ npm i --dry-run @tailwindcss/[email protected]
# both succeed
$ npm i [email protected]
$ npm i @tailwindcss/[email protected]
# control: no bundleDependencies, dry-run is fine
$ npm i --dry-run [email protected]Environment
- npm: 12.0.1
- Node.js: 24.18.0
- OS Name: Linux 7.0.11 (x86_64)
- System Model Name: n/a
- npm config:
; user config (registry auth lines omitted)
min-release-age = 7
min-release-age-exclude = ["@fullbeaker/*"]
registry = "https://registry.npmjs.org/"
; relevant npm 12 defaults, not overridden
allow-remote = "none"
allow-git = "none"
Activity
shooley-apco commentedon Jul 28, 2026
Independently reproduced on Windows 11 / npm 12.0.1 / Node v22.23.1, against the default
registry.npmjs.org. I arrived at this from the other direction and can point at the call site.--dry-runisn't the only trigger —--package-lock-onlyis too.reify.jsbuilds its ideal-tree options as:So anything that sets either flag is affected. In a Tailwind 4 monorepo that makes
npm dedupefail outright, not just previews:The failing call site is the ideal-tree "crack open", not the reify extract:
That's
#buildDepStep'scrackOpenbranch, whose own comment explains why it only happens here:node.resolvedis a bare URL, so npa classifies the spec as typeremoteand pacote's gate fires.reify.jsalready handles exactly this hazard for its own extract:The crack-open call site has no equivalent. A code search for
isRegistryResolvedTarballacross this repo returns onlyworkspaces/arborist/lib/arborist/reify.js, so the exemption added in #9348 / #9495 / #9510 / #9550 never reachedbuild-ideal-tree.js— which would explain why this survived those four fixes.One correction to the issue body: the reason a real install is unaffected isn't that it skips the
cpu: ["wasm32"]package — it's the#completegate. A reification reads bundles in place (per the comment above) and never cracks the tarball open, so the platform mismatch is incidental. That also predicts the control case correctly:lodashpasses becausehasBundleis false, not because of anything platform-related.Two smaller notes:
--allow-remote=rootis not a usable middle ground. This extract passes no_isRoot, socanUseseesisRoot: falseand refuses with thenon-rootwording regardless.allis the only value that unblocks it, which sharpens your point about relaxing the guard just to inspect a change.#nodeFromSpecroutes#checkAllowrejections through#failureNodeso optional-dependency semantics apply; thecrackOpenextract isn't wrapped, so a transitive, platform-mismatched optional dep hard-fails the command instead of being dropped.Line numbers are from the published 12.0.1 bundle and may be offset slightly from
main.chgeo commentedon Aug 6, 2026
Can this be fixed soon? Two patch candidates are available.
coderbyheart commentedon Aug 17, 2026
Thanks for the detailed report. I have encountered the same issue for projects that depend on
@aws-cdk/cloud-assembly-schema.chore: work around npm 12 EALLOWREMOTE bug in Renovate lockfile updates
chore: npm を 12 に固定し、.npmrc を org 共通の基準に揃える
ci(cli-publish-verify): add --allow-remote=all to npm install steps
ci(cli-publish-verify): set allow-remote via .npmrc (CLI flag is igno…
ci(cli-publish-verify): pin Node 20 to dodge npm 11 install --dry-run…
ci(cli-publish-verify): revert experimental npm 11.19 workarounds
TiBata commentedon Sep 17, 2026
Adding test results for the two candidate PRs, since neither has been reviewed yet.
As noted above,
--package-lock-onlyis also a trigger. That is the command Renovate runs for lock file maintenance, so Renovate-managed projects depending on Tailwind CSS 4 (@tailwindcss/oxide) get an "Artifact update problem" as soon as Renovate resolves npm 12.Minimal repro (Node 24.21.0):
Both PRs run from source against this repro:
install --package-lock-only(no lockfile)install --dry-runinstallOn a real project (Astro + Tailwind 4, 437 lockfile entries), the lockfile regenerated from scratch by either PR is identical to npm 11.19.0's: same entries, versions and integrity. Either PR would unblock these users. The current workarounds are pinning npm to 11 via
engines.npm/packageManager, or settingallow-remote=all, which gives up the new default.MikeMcC399 commentedon Sep 17, 2026
@TiBata
Thanks for tying this in to Renovate! We're also seeing this in a public repo - see cypress-io/github-action#1900 (comment)
I came up with the same conclusion as you regarding the workarounds and I'm going for the
allow-remote=allright now because it sets the default the same as npm <12.29 remaining items
upgrade web to Angular 22 and Node 24, move tests to Vitest
npm を 12 に上げ、使う版を package.json の packageManager で決める
fix: hold Renovate's npm below 12 (EALLOWREMOTE on bundleDependencies) (
build(frontend): allow remote fetches to work around npm 12 lockfile bug
chore(frontend): add .npmrc to unblock renovate lockfile maintenance
Update npm lock files with npm 11 until npm 12 is fixed (#37)
fix(renovate): write the lockfile with npm 11 — npm 12 refuses this t…
fix: roughly pin engine versions; npm v12 remote packages disabled
chore(config): pin Renovate's npm to v11 for lockfile updates (#211)
fix(npm): write lock files with npm 11
StayPirate commentedon Oct 31, 2026
Hi @martinrrm, is there any update on this front?
coygeek commentedon Nov 4, 2026
This still reproduces with the published npm 12.2.1 release and the current
latestbranch at10ffa9f35c707fbf91733a07683a7ea96c38e416, using Node v26.12.1 on Darwin 27.2.0 arm64. Both were run from disposable directories with an empty HOME, empty user/global config files, inherited npm environment overrides removed, and fresh caches. The clean configuration reportsallow-remote=none,min-release-age=null, andregistry=https://registry.npmjs.org/.A public-registry case on both builds is:
Both exit 1 with:
A separate fresh run with
--allow-remote=allexits 0 on both builds. That relaxes the policy, so it is only a diagnostic comparison.I also reduced this to a loopback registry serving one package with one bundled child. The tarball bytes and same-origin, registry-prefixed tarball URL were held constant; only the registry manifest's
bundleDependenciesfield changed. Each case used an empty project and cache, with lifecycle scripts ignored. Both builds gave these results:--package-lock-only--package-lock-only--package-lock-only--dry-run--package-lock-only --allow-remote=allThis confirms the nonempty bundle metadata is sufficient to select the failing inspection path, independently of the original package's dependency graph or registry response quirks. The failure happens before a tarball request, consistent with the call path already documented above. No claim that the broader remote-fetch policy should be relaxed is intended.
torvalstrom commentedon Nov 18, 2026
Still reproduces with npm 12.2.3 (Node 24, default registry.npmjs.org).
Minimal repro: a package.json with only
"@tailwindcss/postcss": "4.3.3"as a dependency, thennpm install --package-lock-only --ignore-scripts. npm 12.2.3 fails withEALLOWREMOTE/Refusing to fetch "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.3.tgz". npm 11.21.3 succeeds on the same package.json.This breaks Renovate lockfile updates for every Tailwind 4 project we maintain, so we have pinned Renovate to npm <12 for now. It would be great to get #9819 or #9921 reviewed.
dirkluijk commentedon Nov 27, 2026
We hit this as well with npm 12.2.2 on AWS CDK projects that use a private Nexus registry.
aws-cdk-lib,@aws-cdk/cloud-assembly-schema,datadog-cdk-constructs-v2and@goodnotes-oss/cdk-datadog-resourcesall declarebundleDependencies, sonpm install --package-lock-onlywithout a lockfile fails on a freshly generated project, and Renovate lock file maintenance fails withEALLOWREMOTEonce it resolves npm 12. The refused URL is the tarball on our configured registry, as described above.npm installandnpm ciwork fine.For now we set
allow-remote=allonly in Renovate'snpmrc, so local installs and CI keepallow-remote=none. We would like to drop that again once #9818 or #9819 is merged. A review of either would help every CDK project that runs Renovate on npm 12.