Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Node variant: NPM fails with EACCES error when installing package

オープン
#233 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
docker, node.js, python

調査の方向性

まず、イメージ cimg/python:3.11-node と動作するバリアント cimg/python:3.11.7-node を比較し、その後、報告されたグローバル npm インストールコマンドを再現します。イメージのユーザーと npm グローバルモジュールの権限を追跡します。最新の 3.11-node イメージで、文書化されていない回避策を必要とせずにパッケージを正常にインストールできれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug

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

主要言語
Dockerfile
スター
36
フォーク
33
平均マージ
12時間 48分
マージ済み PR(30日)
3

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

CircleCI-Public/cimg-python のほかの issue

CircleCI-Public/cimg-python の issue をすべて見る

似ている issue

DevOps の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。