Skip to content

Document npm global install permission error #77

@virtualian

Description

@virtualian

Summary

Users get EACCES permission denied when running npm install -g @virtualian/marr on systems where npm was installed via system package manager.

Error

npm error code EACCES
npm error syscall mkdir
npm error path /usr/local/lib/node_modules/@virtualian
npm error errno -13
npm error Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@virtualian'

Solutions

The README previously had a Troubleshooting section covering this. It was removed when trimming the README for public release.

Should add back to docs site at docs/user/how-to/troubleshooting.md or similar:

  1. Use npx (no global install)

    npx @virtualian/marr init --user
  2. Use nvm (recommended)

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
    nvm install node
    npm install -g @virtualian/marr
  3. Change npm prefix

    mkdir ~/.npm-global
    npm config set prefix '~/.npm-global'
    echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.zshrc
    source ~/.zshrc
    npm install -g @virtualian/marr

Action

Add troubleshooting guide to docs site and link from README.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions