No permission · Needs a closer look
EACCES: permission denied
Your system is blocking access to a file or port. Usually a permissions issue.
What the error looks like
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules'
Why it happens
You’re trying to access a file or port that your user account doesn’t have permission to use. Common when using low port numbers (like 80) or system directories.
How to fix it
- Try running the command with sudo (on Mac/Linux)
- Use a higher port number (like 3000 instead of 80)
- Check file permissions with ls -la
Ask your AI coding tool to fix it
Paste this prompt into Claude Code, Cursor, Bolt or Lovable, with your own error in place of the example.
I'm getting this error and I need help understanding and fixing it:
```
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules'
```
Please:
1. Explain what this error means in plain English
2. Tell me the most likely cause
3. Give me the exact code changes or commands I need to fix it
4. Show me how to prevent this error in the future
Got a different error?
Paste any error into the free Error Decoder and get it explained in plain English, with a fix prompt.
Decode my error