Search code examples
node.jsnpmnuxt.jssentry

EACCES: permission denied, mkdir '/root/.npm/sentry-cli'


System: Ubuntu 20.04
NodeJs Version: v14.17.5
NPM Version: 7.20.6
Command used: sudo npm i @nuxtjs/sentry

I'm trying to install @nuxtjs/sentry and getting this message:

code 1 npm ERR! command failed npm ERR! command sh -c node scripts/install.js npm ERR! info sentry-cli Downloading from https://downloads.sentry-cdn.com/sentry-cli/1.68.0/sentry-cli-Linux-x86_64 npm ERR! Error: EACCES: permission denied, mkdir '/root/.npm/sentry-cli'

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-08-21T09_51_43_400Z-debug.log


Solution

  • Using yarn add @nuxtjs/sentry is apparently enough and solves OP's issue.