How to Fix “EPERM: operation not permitted
How to Fix “EPERM: operation not permitted
The error occurs when running npx
because the System Volume Information folder is a protected system folder that normal users and processes cannot access.
Error trace
“EPERM: operation not permitted, scandir ‘E:\System Volume Information'” Error
Solutions to Fix the Issue
Change the Working Directory
If you are running npx
from the root of the E:
drive, move to a different directory before executing the command:
cd E:\YourProjectFolder
npx <your-command>
Run Command Prompt as Administrator
Since the error is related to permissions, try running the command as an administrator:
- Press Win + S, type cmd, and select Run as administrator.
- Then run your
npx
command again.
Check If Your Antivirus or Security Software Is Blocking Access
Some security software may prevent npx
from accessing certain system directories. Try disabling your antivirus temporarily and rerun the command.
Exclude System Folders from Scanning
Modify your command to exclude system folders by explicitly specifying the target folder. Example:
npx create-react-app my-app --use-npm
This ensures npx
does not scan E:\System Volume Information
.
Use a Different Drive or Path
If possible, try running your command from a different drive (e.g., C:
) instead of E:
.
Check User Permissions
If you suspect permission issues, manually check your user permissions:
- Right-click
E:\System Volume Information
โ Properties โ Security. - Ensure that your user has the necessary access.
Reset Node.js and Clear Cache
If the issue persists, try resetting Node.js settings:
npm cache clean --force
npx clear-npx-cache
Then, try running npx
again. Hopefully, these fixes should resolve the error.