Issue using n8n locally: npm EALLOWREMOTE when installing xlsx

Describe the problem/error/question

I’m running n8n locally on Windows.
I’m trying to install the xlsx package, but I get the following error:
npm ERR! code EALLOWREMOTE
npm ERR! Fetching packages of type “remote” have been disabled
npm ERR! Refusing to fetch “xlsx@https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz
Has anyone encountered this before?
Is there a recommended way to install the xlsx package for a local n8n setup?

image

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Thanks for letting us know about this, We have created CV-12 as the internal dev ticket to look into it.

We have taken a look at this issue and are unable to confirm that this is a bug, For now we have closed the internal ticket but if it starts to look like it is a bug our moderation team will flag this again.

Welcome @dit!

The EALLOWREMOTE error is by design in the n8n desktop app on Windows - it sandboxes npm package installs and blocks fetching packages from remote registries like CDNs. It’s not a bug per se, just a limitation of the local desktop environment.

Workaround: you don’t need the xlsx community node if you just need to read/write Excel files. The built-in “Spreadsheet File” node handles .xlsx natively with no extra install. If you specifically need the xlsx npm package for a Code node, switch to running n8n via npx n8n or Docker instead of the desktop app - that environment doesn’t have the remote fetch restriction.

Thanks for the explanation!

However, I think my issue is a bit different. I’m not trying to install the xlsx package or use the Spreadsheet File node.

I’m simply trying to install n8n itself using:

npm install -g n8n

The installation fails with:

npm ERR! code EALLOWREMOTE
npm ERR! Fetching packages of type “remote” have been disabled
npm ERR! Refusing to fetch “xlsx@https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz

So it looks like the installer is trying to fetch the xlsx package automatically during the n8n installation. I never manually installed xlsx.

I also tried running:

npx n8n

but I get the same error.

My environment:

  • OS: Windows
  • Node.js: v24.18.0
  • npm: 12.0.1

Has anyone experienced this? Is this a compatibility issue with Node.js/npm, or is there another dependency causing the installer to fetch xlsx from the SheetJS CDN?

@dit

You can resolve this by explicitly allowing remote fetches for the duration of the installation. Run the following command in your terminal:

For Windows (Command Prompt/PowerShell):

npm install -g n8n --allow-remote-fetch

If that doesn’t work, you can set the config globally first:

npm config set allow-remote-fetch true
npm install -g n8n

Plaintext

Hey there! You're running into a classic case of npm being a bit too secure for its own good. 

The `EALLOWREMOTE` error means your npm client is configured to prevent fetching packages directly from remote URLs (like the SheetJS CDN). This is a security measure, but it completely blocks the `xlsx` package installation.

Here is the step-by-step way to bypass this and get it working for your local Windows n8n setup:

**1. Temporarily Enable Remote Fetches in npm**
Open your command prompt (CMD or PowerShell) and run:
`npm config set allow-remote-fetch true`

**2. Create a Dedicated Directory for External Packages**
It's a good practice to keep external packages separate from the core n8n files. 
```cmd
mkdir C:\n8n_external_packages
cd C:\n8n_external_packages

3. Initialize npm and Install the Package Inside this new directory, run:

DOS

npm init -y
npm install xlsx

4. Configure n8n to Allow and Find the Package You need to tell n8n to allow external modules in the Code node and where to find them on your Windows machine. Before starting n8n, set these two environment variables in your terminal:

DOS

set NODE_FUNCTION_ALLOW_EXTERNAL=xlsx
set NODE_PATH=C:\n8n_external_packages\node_modules
n8n start

5. Revert npm Configuration (Recommended) For security purposes, once the package is installed, you can turn the remote fetch block back on: npm config set allow-remote-fetch false

After starting n8n, you can now use const XLSX = require('xlsx'); in your Code nodes without any issues!

P.S. I actually ran your exact forum post through n8n Mastery / Sensei (a free, gamified AI Co-pilot I just built for the n8n community), and it correctly diagnosed the EALLOWREMOTE CDN block and generated this fix!

I’m attaching a screenshot of its full analysis below. If you ever want to debug workflow and npm errors like this instantly without leaving your n8n canvas, you can check it out here: https://n8n-sensei-app-nu.vercel.app/

Hope this helps you get back to automating your spreadsheets!