2

I am using npm inside a docker container with the user root however I am getting the two following errors:

glob error [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] {
  errno: -13,
  code: 'EACCES',
  syscall: 'scandir',
  path: '/root/.npm/_logs'
}

and

Error: EACCES: permission denied, open '/application/public/mix-manifest.json'
  errno: -13,
  syscall: 'open',
  code: 'EACCES',
  path: '/application/public/mix-manifest.json'
}

however root is the owner of the .npm and .npm/_logs folder:

~/
drwxr-xr-x 4 root root 4096 Mar 25 09:12 .npm

~/.npm/
drwxr-xr-x 2 root root 4096 Mar 25 09:18 _logs

and root has read/write access to the file /application/public/mix-manifest.json:

-rwxrwxr-x  1 www-data www-data  119 Mar 15 14:26 mix-manifest.json

What am I doing wrong?

My Dockerfile contains:

# Node + NPM
RUN curl -kfsSL https://deb.nodesource.com/setup_15.x | bash -
RUN apt-get install -y nodejs
5
  • can you share your Dockerfile? Commented Mar 25, 2021 at 12:36
  • 1
    The npm bit is RUN curl -kfsSL https://deb.nodesource.com/setup_15.x | bash - RUN apt-get install -y nodejs but the whole file is here: pastebin.com/gqcVqAf8 Commented Mar 25, 2021 at 12:46
  • Can you please add RUN w before this problematic curl and paste the answer here? Commented Mar 25, 2021 at 12:53
  • It returned a read error and a decompressionFailed on a package list, full error: pastebin.com/Re8fWTC1 Commented Mar 25, 2021 at 13:22
  • Please edit the question and include these details in the question itself (not as links to somewhere else and not in comments). Commented Mar 25, 2021 at 15:51

1 Answer 1

1

Changing my dockerfile from

# Node + NPM
RUN curl -fsSL https://deb.nodesource.com/setup_15.x | bash -
RUN apt-get install -y nodejs

to

# Node + NPM
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get install -y nodejs

fixed the problem.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.