EPERM
node
filesystem_error
ai_generated
partial
Error: EPERM: operation not permitted
ID: node/eperm-operation-not-permitted
82%Fix Rate
85%Confidence
50Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 20 | active | — | — | — |
Root Cause
File system permission denied. Common on Windows (file locked by antivirus) or Linux (root-owned files).
genericWorkarounds
-
90% success Check file ownership and permissions: ls -la or icacls on Windows
ls -la or icacls on Windows
Sources: https://nodejs.org/api/fs.html#file-system-permissions
-
85% success Close applications that may have the file locked (IDE, other Node processes)
IDE, other Node processes
Sources: https://nodejs.org/api/errors.html#common-system-errors
-
88% success On npm install errors, delete node_modules and package-lock.json, then retry
rm -rf node_modules package-lock.json && npm install
Sources: https://docs.npmjs.com/cli/v10/commands/npm-install
Dead Ends
Common approaches that don't work:
-
Run as administrator/root
70% fail
Security risk — fix the permission issue instead
-
Disable antivirus temporarily
80% fail
Unreliable and unsafe workaround
Error Chain
Frequently confused with: