Skip to content

Conversation

@Swimburger
Copy link

Added comment to clarify node-version requirement.

Run npm install -g npm@latest
npm error code EACCES
npm error syscall mkdir
npm error path /usr/local/share/man/man5
npm error errno -13
npm error Error: EACCES: permission denied, mkdir '/usr/local/share/man/man5'
npm error     at async mkdir (node:internal/fs/promises:858:10)
npm error     at async Promise.all (index 0)
npm error     at async Promise.all (index 1)
npm error     at async #createBinLinks (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js:394:5)
npm error     at async Promise.allSettled (index 0)
npm error     at async #linkAllBins (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js:375:5)
npm error     at async #build (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js:160:7)
npm error     at async Arborist.rebuild (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js:62:5)
npm error     at async [reifyPackages] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:325:11)
npm error     at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:142:5) {
npm error   errno: -13,
npm error   code: 'EACCES',
npm error   syscall: 'mkdir',
npm error   path: '/usr/local/share/man/man5'
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/2025-10-28T15_30_01_678Z-debug-0.log
Error: Process completed with exit code 243.

Added comment to clarify node-version requirement.
@Swimburger Swimburger requested review from a team and leobalter as code owners October 28, 2025 16:01
@wraithgar
Copy link
Member

wraithgar commented Oct 28, 2025

That error doesn't really fully explain this change. Also I don't think a comment in an example workflow is the best place to specify that information.

@Swimburger
Copy link
Author

Agreed, but it would've saved me a lot of time. Any way to have user's not run into that error would be great. Right now it's not clear that this node version is required to avoid this error.
We ended up doing npx -y npm@latest ... for our workflow to circumvent this and keep the changes minimal.

@wraithgar
Copy link
Member

The section that follows and includes "critical requirement" could be expanded to also specify that you need to be on a supported node version.

@Swimburger
Copy link
Author

It's not just a supported version of Node, because when I ran node --version the version (v20.19.5) was the same whether I specified node-version: '20' or not.
The setup node with node-version: '20' changes something else that leads to the npm install command not to fail.

@wraithgar
Copy link
Member

The setup node with node-version: '20' changes something else that leads to the npm install command not to fail.

What's the node version by default? It's possible the default node version ships with an old version of npm that had a windows bug with updating.

@Swimburger
Copy link
Author

I'm using ubuntu-latest and get these versions beforing updating npm:

Node: v20.19.5
NPM: 10.8.2

Here's the workflow file:

name: ci

on: [push]

jobs:
  publish:
    runs-on: ubuntu-latest
    permissions:
      id-token: write
    steps:
      - name: Checkout repo
        uses: actions/checkout@v4

      - name: Set up node
        uses: actions/setup-node@v4
                
      - name: Update npm
        run: |
          node -v
          npm -v
          npm install -g npm@latest
          node -v
          npm -v

      - name: Install pnpm
        uses: pnpm/action-setup@v4

      - name: Install dependencies
        run: pnpm install

      - name: Build
        run: pnpm build

      - name: Publish to npm
        run: npm publish --access public

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants