Skip to content
Nilay Kabariya

Entry No.091·Fixes··4 min read

Fix: npm error code EALLOWREMOTE (and EALLOWGIT), tested

npm error code EALLOWREMOTE: Fetching packages of type remote have been disabled. Every case reproduced on npm 12, from npx to npm ci, with each fix.

The error, verbatim

Jump to the fix ↓
npm error code EALLOWREMOTE
npm error Fetching packages of type "remote" have been disabled
npm error Refusing to fetch "is-odd@https://registry.npmjs.org/is-odd/-/is-odd-3.0.1.tgz"
✓ Reproduced on Windows 11 Pro

Tested on

npm
12.0.2, 12.1.0, 12.2.1 (and 11.20.0 for comparison)
Node
26.13.0 LTS
OS
Windows 11 Pro
Contents
  1. Which dependencies get which error01
  2. Your own package.json: allow root02
  3. “non-root packages”: a dependency of a dependency03
  4. npm ci in CI: an old lockfile04
  5. npx with a URL05
  6. A misspelled setting fails quietly06
  7. How this was tested07

npm 12 stopped installing packages from anywhere but a registry unless you allow it. A dependency given as a tarball URL now fails with EALLOWREMOTE, and one from git fails with EALLOWGIT. npm 11 installed every one of them without a word.

You may not have chosen npm 12 on purpose. Node 26.13.0, the new LTS, still ships npm 11.20.0, but npm install -g npm now gives you 12.2.1, the version tagged latest.

I ran each case on npm 12.0.2, 12.1.0 and 12.2.1. All three behaved the same, and all three start with allow-remote and allow-git set to none:

> npm config get allow-remote
none

Which dependencies get which error

Dependency npm 11.20.0 npm 12
https://…/is-odd-3.0.1.tgz in package.json installed EALLOWREMOTE
the same URL on the command line, npm install https://…tgz installed EALLOWREMOTE
a GitHub archive, https://github.com/…/archive/refs/tags/3.0.1.tar.gz installed EALLOWREMOTE
github:jonschlinkert/is-odd installed EALLOWGIT
git+https://github.com/jonschlinkert/is-odd.git installed EALLOWGIT
npx https://…/cowsay-1.6.0.tgz ran EALLOWREMOTE
file:../lib installed installed
a normal registry version, "^7.0.0" installed installed

A GitHub link is not automatically “git”. The archive .tar.gz URL counts as remote, so it needs allow-remote, not allow-git. file: dependencies are untouched, because allow-file starts at all.

The EALLOWGIT version reads:

npm error code EALLOWGIT
npm error Fetching packages of type "git" have been disabled
npm error Refusing to fetch "is-odd@github:jonschlinkert/is-odd"

Your own package.json: allow root

When the URL or git link is in your own package.json, root is enough. It allows these sources for your direct dependencies, and nothing deeper.

Add it to the project’s .npmrc, next to package.json, so everyone who installs the project gets it:

allow-remote=root
allow-git=root

Keep only the line you need. For a one-off install, the flag works too: npm install --allow-remote=root.

In CI, the environment variable did the same job without a file: NPM_CONFIG_ALLOW_REMOTE=root npm install installed on all three npm 12 versions.

“non-root packages”: a dependency of a dependency

When the URL belongs to one of your dependencies, root doesn’t help, and npm says so with one extra word:

npm error code EALLOWREMOTE
npm error Fetching non-root packages of type "remote" have been disabled
npm error Refusing to fetch "is-odd@https://registry.npmjs.org/is-odd/-/is-odd-3.0.1.tgz"

That’s what I got on every npm 12 version with the root setting from above, installing a package whose own package.json points at a tarball URL. If you see non-root, the setting is already working for your own dependencies, and the problem is deeper in the tree.

The better fix is an override that swaps the URL for the same version from the registry, which npm 12 allows by default. In your package.json:

"overrides": {
  "is-odd": "3.0.1"
}

If the package isn’t on the registry, allow-remote=all also worked. all lets every package in your tree fetch from any URL, which is the risk npm 12 turned off, so keep it for as short a time as you can.

npm ci in CI: an old lockfile

This one catches CI first. I created a lockfile with npm 11.20.0 for a project with a tarball dependency. It records the URL as "resolved": "https://registry.npmjs.org/is-odd/-/is-odd-3.0.1.tgz". Then I ran npm ci on 12.2.1:

npm error code EALLOWREMOTE
npm error Fetching packages of type "remote" have been disabled
npm error Refusing to fetch "is-odd@https://registry.npmjs.org/is-odd/-/is-odd-3.0.1.tgz"

A lockfile with only normal registry dependencies went through npm ci on 12.2.1 without errors. Every registry package has a resolved URL too; npm only refuses the ones that were declared as URLs.

The same .npmrc line fixes npm ci, since it reads the project’s .npmrc. Commit the file so CI picks it up:

allow-remote=root

npx with a URL

npx https://registry.npmjs.org/cowsay/-/cowsay-1.6.0.tgz hi failed with EALLOWREMOTE on every npm 12 version.

Pass the setting to npx itself:

npx --allow-remote=root https://registry.npmjs.org/cowsay/-/cowsay-1.6.0.tgz hi

A misspelled setting fails quietly

Here the .npmrc and the flag behave differently. A typo in .npmrc, allow-remotes=root, only printed a warning, and the install still failed with EALLOWREMOTE:

npm warn Unknown project config "allow-remotes". This will stop working in the next major version of npm.
npm error code EALLOWREMOTE

The same typo as a flag, --allow-remotes=root, stopped npm 12 straight away with npm error code EUNKNOWNCONFIG. If you added the line and still get EALLOWREMOTE without the word “non-root”, look for that warning first.

How this was tested

Windows 11 Pro, Node 26.13.0 (the official zip, checksum checked against SHASUMS256.txt), on October 29, 2026. npm 11.20.0 is the copy bundled with Node 26.13.0. npm 12.0.2, 12.1.0 and 12.2.1 were installed side by side and run with that Node. Each case ran in a fresh folder against the public npm registry and GitHub, with no sign-in. The dependency-of-a-dependency case used a local package packed with npm pack, whose own dependency was a tarball URL. The scripts and the full output are public.

— N.K., end of entry No.091

Useful? Pass it on:Post on XFollow @EmotionalMatter

Related entries

  1. No.037

    npm 12 breaking changes, tested: what actually breaks

    The headline change, install scripts blocked by default, broke puppeteer, cypress, sqlite3 and Claude Code's npm package, and silently skipped lefthook's git hooks. esbuild, bcrypt, sharp and better-sqlite3 kept working. Every install reported success, and the only sign was a warning after the summary.

    TESTED6 minWindows
  2. No.093

    Fix: bigint Failed to load bindings, pure JS will be used

    bigint: Failed to load bindings, pure JS will be used. Why npm 12 shows it on every install, whether it matters, and how to get the native build back.

    > bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)

    FIXED3 minWindows
  3. No.086

    npm error code EACCES: permission denied, 3 causes tested

    npm error code EACCES with syscall mkdir or open: a global install, a cache that sudo left behind, or Docker. Each reproduced, with the fix that lasts.

    > npm error code EACCES

    FIXED2 min
  4. No.085

    npm warn EBADENGINE Unsupported engine, tested

    EBADENGINE is only a warning, until it isn't. Tested with Vite and React Router on Node 20 and 22: when npm warns, when it fails, and when it says nothing.

    > npm warn EBADENGINE Unsupported engine {

    FIXED4 min

Post card · Every Sunday

What broke this week.

One email on Sundays: the Node, TypeScript, Python and AI SDK releases that broke builds that week, each one reproduced, with a link to the fix that worked. Never shared, and you can leave any time.

— Nilay

or follow by RSSor on X

By subscribing you agree to the privacy note. One click to leave.

tip: paste the exact error text