// guides · n8n error index

n8n broke after updating to 2.x? Upgrade and migration errors, 20 tests

What really breaks when you update n8n from 1.x to 2.x: Unrecognized node type executeCommand, access to env vars denied, Access to the file is not allowed, the old Start node, downgrades and backups. Exact messages and fixes from 20 real runs on n8n 1.123.86 and 2.43.7.

Updated 2026-10-22 · about 10 minutes

Still stuck after these steps? Paste your exact n8n error and we'll reproduce it and email you the fix, free →

Steps

  1. Copy your data first

    Stop n8n and copy the .n8n folder (or dump Postgres). In our test n8n migrated the database on the first start without asking, and nothing stopped the old version from running on it afterwards.

  2. Start the new version once and watch the log

    You should see Migrations in progress, please do NOT stop the process. Don't stop it. Ours finished 172 migrations from 1.123.86 to 2.43.7 in about 5 seconds.

  3. Run your main workflows by hand

    Open each important workflow and run it once. In our test the upgrade kept everything, but three kinds of node failed only at run time.

  4. Match each error to its setting

    Unrecognized node type: n8n-nodes-base.executeCommand needs NODES_EXCLUDE=[]. access to env vars denied needs N8N_BLOCK_ENV_ACCESS_IN_NODE=false. Access to the file is not allowed. needs N8N_RESTRICT_FILE_ACCESS_TO or the ~/.n8n-files folder.

  5. Replace legacy nodes

    A workflow starting with the old Start node failed with Missing node to start execution. Swap it for a Manual Trigger. Old Function nodes still ran, but move them to Code nodes when you can.

What broke when we upgraded n8n 1.x to 2.x

On 22 October 2026 we installed n8n 1.123.86 (the last 1.x line) with SQLite, imported 4 workflows and a credential, ran them, then started n8n 2.43.7 on the same folder and ran them again. Then we tried the fixes, a downgrade and a fresh import: 20 runs in all. Each row is what we saw.

What we didWhat n8n showedFix
Started n8n 2.43.7 on the folder a 1.123.86 install had used (SQLite, 4 workflows, 1 credential)Migrations in progress, please do NOT stop the process., then 172 migrations in about 5 seconds. All 4 workflows were still there.Nothing to fix, but copy the .n8n folder (or your Postgres database) first and don't stop n8n while this message is up.
Workflow with an Execute Command nodeUnrecognized node type: n8n-nodes-base.executeCommandn8n 2.x hides Execute Command and Local File Trigger by default. Setting NODES_EXCLUDE=[] brought it back and the same workflow printed its output again. Only do this if you trust everyone who can edit workflows.
Code node reading $env.HOMEaccess to env vars deniedSet N8N_BLOCK_ENV_ACCESS_IN_NODE=false; the same Code node returned the value. Safer: pass the value in through a credential or an Edit Fields node.
Read/Write Files from Disk reading /tmp/up49/in.txt (worked on 1.123.86)Access to the file is not allowed.Move the file into ~/.n8n-files or set N8N_RESTRICT_FILE_ACCESS_TO to its folder. With N8N_RESTRICT_FILE_ACCESS_TO=/tmp/up49 it read the file again.
Code node with require('os')Module 'os' is disallowed [line 1] on 2.43.7 (on 1.123.86: Cannot find module 'os')Not new in 2.x, only the wording changed. Allow the module with NODE_FUNCTION_ALLOW_BUILTIN=os (several: crypto,os); that worked.
Old workflow that starts with the legacy Start node (n8n-nodes-base.start)Ran on 1.123.86. On 2.43.7: Missing node to start executionThe legacy Start node isn't in n8n 2.43.7. Replace it with a Manual Trigger (or the trigger the workflow really needs).
Old Function node (n8n-nodes-base.function)Ran fine on both versionsNot a blocker today, but move it to a Code node when you touch the workflow.
Downgrade: started 1.123.86 again on the migrated folderNo error. /healthz returned 200 and a workflow rann8n didn't stop the old version, but it's running on a database built for 2.x. To go back, restore the copy you made before the upgrade instead.
Fresh 2.43.7 folder, imported the export:workflow and export:credentials files from 1.123.86Both imports succeeded (4 workflows, 1 credential)Credentials stay encrypted with the old key. Bring the old N8N_ENCRYPTION_KEY too, or you get Credentials could not be decrypted.

The upgrade itself worked; old workflows broke

The database migration was the easy part: one start, 172 migrations, about 5 seconds, every workflow kept. n8n also tightened the settings file to 0600 on its own and printed a deprecation warning that ~/.n8n/binaryData will be renamed to storage in v3. What failed were workflows that used things 2.x now blocks by default: the Execute Command node, $env in a Code node, and reading files outside ~/.n8n-files. All three ran green on 1.123.86 and failed on 2.43.7 with no change to the workflow. Each came back with one setting:

# n8n 2.x: bring back 1.x behaviour, one setting per problem
NODES_EXCLUDE=[]                       # Execute Command + Local File Trigger
N8N_BLOCK_ENV_ACCESS_IN_NODE=false     # $env in Code nodes and expressions
N8N_RESTRICT_FILE_ACCESS_TO=/data/files   # Read/Write Files outside ~/.n8n-files
NODE_FUNCTION_ALLOW_BUILTIN=crypto,os  # require() of Node built-ins in Code

Each of these was turned off on purpose, for security. Turn on only the one you need, and only on an instance where everyone who can edit workflows is trusted.

Back up before you update

Nothing in our upgrade asked for confirmation, and the old version later started on the migrated database without any warning, so a copy taken before the update is the only clean way back:

# Before upgrading (SQLite / npm install): copy the whole folder
cp -a ~/.n8n ~/.n8n-backup-$(date +%F)

# Also keep plain exports (they still need the same encryption key)
n8n export:workflow --all --output=workflows.json
n8n export:credentials --all --output=credentials.json

# Docker: stop the container, then copy the volume
docker compose stop n8n
docker run --rm -v n8n_data:/data -v "$PWD":/backup alpine \
  tar czf /backup/n8n-data-$(date +%F).tgz -C /data .

The exports are a second safety net, not a replacement: credentials in them are still encrypted, so you need the same N8N_ENCRYPTION_KEY to use them on another instance. If you move servers, read n8n credentials could not be decrypted first.

Good to know

What we didn't test

FAQ

Why does n8n say "Unrecognized node type: n8n-nodes-base.executeCommand" after updating?

n8n 2.x excludes the Execute Command and Local File Trigger nodes by default. In our test, setting NODES_EXCLUDE=[] made the same workflow run again. Only do that if you trust everyone who can edit workflows.

Why does my Code node say "access to env vars denied" after the n8n 2.0 update?

n8n 2.x blocks $env in Code nodes and expressions by default. Setting N8N_BLOCK_ENV_ACCESS_IN_NODE=false brought the value back in our test. A credential or an Edit Fields node is the safer place for the value.

Is it safe to upgrade n8n from 1.x to 2.x?

The database part was: n8n 2.43.7 ran 172 migrations on a 1.123.86 SQLite database in about 5 seconds and kept all workflows. Back up first anyway, then run your important workflows by hand, because nodes that 2.x blocks by default only fail when they run.

Can I downgrade n8n after upgrading?

In our test n8n 1.123.86 started on the migrated database with no error and ran a workflow, so nothing stops you, but it is running on a database built for the newer version. Restore the copy you took before the upgrade instead.

Why does Read/Write Files from Disk say "Access to the file is not allowed" after upgrading?

In n8n 2.43.7 the node only reaches ~/.n8n-files by default. Move the file there or set N8N_RESTRICT_FILE_ACCESS_TO to its folder; both worked in our tests.

Related guides

New guides

Still stuck on your n8n error?

Paste the exact error and say what the workflow should do. We reproduce it on a real n8n install and email you the fix or a working workflow, usually within 24h. Free while we're in beta.

We'll only email you about your error and TaskToAgent.