News
OneDrive sync will exclude node_modules: what to do
From December 14, 2026, OneDrive stops uploading new node_modules folders (MC1558030). What OneDrive never syncs, and the policies that control it.
Starting December 14, 2026, the OneDrive sync app for Windows and Mac will no longer upload new node_modules folders to the cloud (message MC1558030, published November 17, 2026, rollout through mid-January 2027). The folders stay on the device but don't show up on the web or on other devices. This mostly affects JavaScript developers who keep projects in OneDrive, and the admins who need to decide whether to keep the new behavior.
What it is: OneDrive's default exclusion list
The default exclusion list is a list of file and folder names that Microsoft tells OneDrive never to upload. It has been around for a while (shortcut .lnk files are on it) and it is growing this year:
- October 5, 2026:
.db-walfiles (temporary SQLite journals) are excluded by default (MC1457838); - December 14, 2026: folders named
node_modules, in any capitalization, join the list (MC1558030).
node_modules is where npm, Yarn or pnpm install a JavaScript project's dependencies. It often holds tens of thousands of tiny files, is rebuilt with one command (npm install) and has no business in a backup. Syncing it slows OneDrive down, eats storage and causes conflicts as soon as two machines install their dependencies.
What OneDrive never syncs
The default list is only one of the reasons a file stays on the device. There are four, and it pays to know them before the first "my folder isn't on the web" ticket.
| Level | Examples | Who decides | How to control it |
|---|---|---|---|
| Always blocked | .tmp, .ini, reserved names and characters | Microsoft | You can't: rename the file |
| Default list | .lnk, .db-wal, node_modules | Microsoft | DisableDefaultODIgnoreList policy |
| Admin list | *.pst, *.exe, a folder name | The admin | EnableODIgnoreListFromGPO, EnableODIgnoreFolderListFromGPO |
| User exclusions | Whatever the user adds | The user | DisableChangesToODIgnoreList |
Reserved names (.lock, CON, PRN, desktop.ini, _vti_, names starting with ~$…) and invalid characters are listed in Restrictions and limitations in OneDrive and SharePoint. Unlike exclusions, they often raise a visible sync error: see how to fix a stuck OneDrive sync.
What do users see when a folder is excluded?
Nothing dramatic, and that is the problem. No error, no red badge: File Explorer marks the item Excluded from sync, and a message appears in the OneDrive activity center. The folder works normally on the device.
The cases that will generate questions:
- a developer moves to a new PC and finds their projects without
node_modules. Runningnpm install(oryarn,pnpm install) again fixes it; - a project shared in a synced SharePoint library won't start on a colleague's machine, for the same reason;
- someone looks for the folder on the web to download it. It isn't there, and that's expected.
Projects that deliberately commit their dependencies, or a business tool that relies on a folder named node_modules, are the only real cases where the change can break something.
How do you keep node_modules in sync?
Microsoft offers a single lever: turn off the whole default list. There is no option to bring back node_modules alone.
| Policy (display name) | Registry value (Windows) | plist key (Mac) |
|---|---|---|
| Disable the default ignored extension and folder lists | DisableDefaultODIgnoreList | DisableDefaultODIgnoreList |
| Prevent users at your organization from changing the default ignored extension and folder lists | DisableChangesToODIgnoreList | DisableChangesToODIgnoreList |
| Exclude specific kinds of files from being uploaded | EnableODIgnoreListFromGPO | EnableODIgnore |
| Exclude specific kinds of folders from being uploaded | EnableODIgnoreFolderListFromGPO | EnableODIgnoreFolders |
On Windows, the values live under HKLM\SOFTWARE\Policies\Microsoft\OneDrive; on Mac, in the com.microsoft.OneDrive domain. To test on one device before deploying through Group Policy or Intune:
# Turn off OneDrive's default exclusion list (test device, admin rights)
$key = "HKLM:\SOFTWARE\Policies\Microsoft\OneDrive"
New-Item -Path $key -Force | Out-Null
New-ItemProperty -Path $key -Name "DisableDefaultODIgnoreList" -Value 1 -PropertyType DWord -Force
# Restart OneDrive to apply the policy
Stop-Process -Name OneDrive -ErrorAction SilentlyContinue
Start-Process "$env:LOCALAPPDATA\Microsoft\OneDrive\OneDrive.exe"
Three side effects to know before you turn it on:
- the policy disables the whole list:
.db-waland.lnkfiles start syncing again along withnode_modules; - it doesn't catch up on the past: a folder that was already excluded stays excluded until it is recreated;
- your admin exclusions and users' own exclusions still apply, unless you also lock the list with
DisableChangesToODIgnoreList.
The other way round, if you want to go further than Microsoft (also excluding .venv, bin, obj or .pst files), the Exclude specific kinds of folders from being uploaded policy takes complete folder names, with no wildcards. The file policy accepts the asterisk (*.pst). Neither one removes what is already in the cloud.
What I recommend
- Change nothing by default: for most organizations, excluding
node_modulesis an improvement. - Warn the service desk and developers before December 14, 2026: "excluded from sync" doesn't mean "sync is broken", and
npm installsolves it. - List the exceptions: if a project or business tool needs its
node_modulesfolder in the cloud, testDisableDefaultODIgnoreListon one device, then target a group. - Build your own list while you're at it:
.pstfiles, Python virtual environments, build folders. The folder exclusion policy handles that. - Restate the good practice: source code belongs in a Git repository, not in a synced OneDrive folder.
For the rest of sync, see when to sync a SharePoint library or add a shortcut. If you want your admins trained on OneDrive policies, it is a module of SharePoint training level 3.
- OneDrive
- Sync
- Group Policy
- Governance
Sources
- Message Center MC1558030 — OneDrive for Windows and Mac: node_modules folders will be excluded from sync by default (public copy, published November 17, 2026)
- Message Center MC1457838 — Microsoft OneDrive: New policies to control file exclusions (public copy, published August 19, 2026)
- Microsoft Learn — Use OneDrive policies to control sync settings
- Microsoft Learn — Deploy and configure the OneDrive sync app for Mac
- Microsoft Support — Restrictions and limitations in OneDrive and SharePoint
Share this article
Know a colleague or client who deals with this? Send them the article in one click.
Read next
Comments
Loading comments…