Skip to content

Commit

Permalink
Fix EACCES permissions error for ubuntu-latest
Browse files Browse the repository at this point in the history
`npm install -g bats`
Above command was failing with below logs
```
With Unicode UTF-16 support.
With native language support.
With support to preserve the user and group ownership of files.
LOCALEDIR: /usr/share/locale
http://waterlan.home.xs4all.nl/dos2unix.html
npm error code EACCES
npm error syscall mkdir
npm error path /usr/local/share/man/man7
npm error errno -13
npm error [Error: EACCES: permission denied, mkdir '/usr/local/share/man/man7'] {
npm error   errno: -13,
npm error   code: 'EACCES',
npm error   syscall: 'mkdir',
npm error   path: '/usr/local/share/man/man7'
npm error }
npm error
npm error The operation was rejected by your operating system.
npm error It is likely you do not have the permissions to access this file as the current user
npm error
npm error If you believe this might be a permissions issue, please double-check the
npm error permissions of the file and its containing directories, or try running
npm error the command again as root/Administrator.

npm error A complete log of this run can be found in: /home/runner/.npm/_logs/2024-07-13T16_29_06_857Z-debug-0.log
```

References:
1. actions/runner-images#9644
2. https://github.com/microsoft/TypeScript/pull/58102/files
3. https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally
  • Loading branch information
hrishikesh-kadam committed Jul 13, 2024
1 parent dc843fd commit 58e4709
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,9 @@ jobs:
- run: git config --global core.autocrlf false
if: runner.os == 'Windows'
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
if: startsWith(matrix.runner, 'ubuntu')
- run: ./ci/prerequisite.sh
- run: ./ci/ci-common-scripts.sh
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,9 @@ jobs:
- run: git config --global core.autocrlf false
if: runner.os == 'Windows'
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
if: startsWith(matrix.runner, 'ubuntu')
- run: ./ci/prerequisite.sh
- run: ./ci/ci-common-scripts.sh

0 comments on commit 58e4709

Please sign in to comment.