Software⏱️ 4 min read📅 2026-06-03

How to Fix: Error: EPERM: operation not permitted, unlink 'D:\Sources\**\node_modules\fsevents\node_modules\abbrev\package.json'

Quick Answer: The issue is likely due to the recent update of npm to version 5.4.0, which introduced a new permission model that requires explicit permission to delete files. Try running the command with elevated privileges or using the `--force` flag to force the operation.

The error EPERM: operation not permitted occurs when the system denies access to a file or directory. In this case, it's related to the npm package installation process on Windows. The issue is caused by an incompatibility between the version of npm and the file system permissions.

This error can be frustrating for users who rely on npm for package management. However, there are steps you can take to resolve the issue and install packages successfully.

🔍 Why This Happens

  • The primary cause of this error is due to the fact that npm version 5.4.0 uses a different file system permission model than previous versions. This change affects how npm handles package installation and deletion on Windows.
  • Another possible cause could be related to the specific package or module being installed, which may have conflicting dependencies or permissions issues.

🛠️ Step-by-Step Verified Fixes

Resolving EPERM Error by Changing File System Permissions

  1. Step 1: Open Command Prompt as an administrator and navigate to the directory where the error occurs (e.g., D:/sources"). Type `icacls` followed by the path of the affected file or directory to check the current permissions. This will display the current access control settings.
  2. Step 2: If the permission issue is caused by a specific user account, you can try changing the permissions for that account using the built-in Windows utility `cacls`. Run the command `cacls /g :R` (replace `` with your actual username).
  3. Step 3: Alternatively, you can use the `fsutil` tool to remove the file system restrictions. Open Command Prompt as an administrator and run the command `fsutil.exe file setownership `. This will reset the ownership of the affected file or directory.
  4. Step 4: After changing the permissions, try running npm install again to see if the error persists.

Resolving EPERM Error using npm Configuration

  1. Step 1: Open the `npm config` command in Command Prompt as an administrator and run the command `npm config delete fsevents`. This will remove the fsevents package from your npm configuration.
  2. Step 2: Alternatively, you can try setting the `fsevents` package to a version that is known to work with previous versions of npm. Run the command `npm config set fsevents `, replacing `` with a compatible version (e.g., 4.x).
  3. Step 3: After configuring npm, try running npm install again to see if the error persists.

✨ Wrapping Up

To resolve the EPERM error when installing packages using npm on Windows, you can try changing file system permissions or configuring npm settings. If the issue persists, consider seeking further assistance from a Windows administrator or IT professional.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions