Software⏱️ 2 min read📅 2026-05-31

How to Fix: npm install -g less does not work: EACCES: permission denied

EACCES: permission denied error when installing npm package globally.

Quick Answer: Try checking your system settings or restarting.

To resolve the EACCES: permission denied error when installing Less globally using npm, first ensure that you have administrative privileges or use a user account with sufficient permissions.

🔧 Proven Troubleshooting Steps

Method 1: Run as Administrator

  1. Step 1: Open the Terminal and navigate to your project directory.

Method 2: Use a User Account with Sufficient Permissions

  1. Step 1: Create a new user account with elevated permissions, then switch to that account.

💡 Conclusion

By following these steps, you should be able to successfully install Less globally using npm without encountering the EACCES: permission denied error.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions