Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node variant: NPM fails with EACCES error when installing package #233

Open
tkapuranis opened this issue Mar 11, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@tkapuranis
Copy link

Describe the bug
npm global install fails with EACCES error when using latest node variant image for python 3.11.

To Reproduce
Install an npm package globally

npm-install:
    resource_class: small
    docker:
      - image: cimg/python:3.11-node
    steps:
      - run:
          name: Install junit-merger
          command: |
            npm install -g junit-report-merger

Results in

npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules/junit-report-merger
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/junit-report-merger'
npm ERR!  [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/junit-report-merger'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/usr/local/lib/node_modules/junit-report-merger'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in: /home/circleci/.npm/_logs/2024-03-11T20_27_47_096Z-debug-0.log

Exited with code exit status 243

Expected behavior
Package is installed and available

Workarounds
Explicitly using the previous 3.11 version (cimg/python:3.11.7-node) works as expected

@tkapuranis tkapuranis added the bug Something isn't working label Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant