Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • Pod fails in deployment due to npm cache root-owned files.

    Posted on

    I have a Node.js pod that works as a standalone pod, but fails in a deployment due to npm cache root-owned files.

    Error suggests permission issue with npm cache folder. Need help resolving this issue.

    Im using:
    CRC version: 2.29.0+da5f55
    OpenShift version: 4.14.1
    Podman version: 4.4.4

    Repo that has the error:
    https://github.com/natewilcox/ocp_test

    Error:
    Server listening at http://localhost:8080
    npm ERR! code EACCES
    npm ERR! syscall mkdir
    npm ERR! path /.npm
    npm ERR! errno -13
    npm ERR!
    npm ERR! Your cache folder contains root-owned files, due to a bug in
    npm ERR! previous versions of npm which has since been addressed.
    npm ERR!
    npm ERR! To permanently fix this problem, please run:
    npm ERR! sudo chown -R 1000660000:0 "/.npm"
    npm ERR! Log files were not written due to an error writing to the directory: /.npm/_logs
    npm ERR! You can rerun the command with

    --loglevel=verbose
    to see the logs in your terminal

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2025 Red Hat