EACCES permissions error when trying to install esbuild using npm or yarn
- Dominant language
- Go
- Stars
- 40.1k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
Hi Everyone,
I was trying to install esbuild for an Angular project using npm and then later yarn, I faced EACCES permissions issue on my Ubuntu Linux 22.04 LTS system. Even though there were appropriate permissions (read, write and execute) on the directory containing the node modules folder, I faced EACCES (-13) error. In install.js file, there was a comment which mentioned this issue and pointed to Evan's comment in #1711. But upon further investigation, I found that, this issue can be easily resolved by adding **exec** mounting option to the device where the node_modules folder is present.
**Fix for this issue on Ubuntu Linux:** Add the **exec** mounting option (more about mounting options on https://help.ubuntu.com/community/Fstab) with **necessary permissions** to the respective device and directory containing the node modules folder.
To do this, open Disks, select the device and click on Edit mount options.

Add the exec mount option explicitly so that the esbuild binary can execute and the issue will be fixed.
I have specified defaults (defaults = rw, suid, dev, exec, auto, nouser, and async) for mounting which contains exec as well.


I hope this works if someone faces similar issue while installing esbuild !
Evan, please approve this as I spent two days finding the fix and get clarified that the issue was not in esbuild.
Contributor guide
No contributing guide indexed for this repository
Research direction
The report points to install.js and the discussion in issue #1711. Start by reading the existing comment and that discussion, then determine whether the exec mount guidance belongs in project documentation; done would be an accepted documentation update or a maintainer decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, ubuntu
- Domain
- documentation, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100