ShareFlow
All articles

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.

Valentin Laurent6 min read
Share

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-wal files (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.

Four-column diagram of OneDrive sync exclusions. Always blocked: .tmp and .ini files, reserved names such as .lock, CON or desktop.ini, invalid characters, with no control other than renaming the file. Default list managed by Microsoft: .lnk, .db-wal since October 5, 2026, node_modules from December 14, 2026, which a policy can turn off. Admin lists through GPO, Intune or plist: file types and folder names, which users can't remove. The user: files they add to their own list in OneDrive settings, which a policy can lock
The four levels of OneDrive sync exclusion, and the policy that controls each one
LevelExamplesWho decidesHow to control it
Always blocked.tmp, .ini, reserved names and charactersMicrosoftYou can't: rename the file
Default list.lnk, .db-wal, node_modulesMicrosoftDisableDefaultODIgnoreList policy
Admin list*.pst, *.exe, a folder nameThe adminEnableODIgnoreListFromGPO, EnableODIgnoreFolderListFromGPO
User exclusionsWhatever the user addsThe userDisableChangesToODIgnoreList

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. Running npm install (or yarn, 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 listsDisableDefaultODIgnoreListDisableDefaultODIgnoreList
Prevent users at your organization from changing the default ignored extension and folder listsDisableChangesToODIgnoreListDisableChangesToODIgnoreList
Exclude specific kinds of files from being uploadedEnableODIgnoreListFromGPOEnableODIgnore
Exclude specific kinds of folders from being uploadedEnableODIgnoreFolderListFromGPOEnableODIgnoreFolders

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-wal and .lnk files start syncing again along with node_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

  1. Change nothing by default: for most organizations, excluding node_modules is an improvement.
  2. Warn the service desk and developers before December 14, 2026: "excluded from sync" doesn't mean "sync is broken", and npm install solves it.
  3. List the exceptions: if a project or business tool needs its node_modules folder in the cloud, test DisableDefaultODIgnoreList on one device, then target a group.
  4. Build your own list while you're at it: .pst files, Python virtual environments, build folders. The folder exclusion policy handles that.
  5. 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.

Sources

Share this article

Know a colleague or client who deals with this? Send them the article in one click.

Read next

Comments

Loading comments…

Leave a comment

Comments are reviewed before they are published. Only your first name and last-name initial are shown.