-1

When I try to install adonis Cli I get this permison error:

npm ERR! path ../lib/node_modules/@adonisjs/cli/index.js
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall symlink
npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/@adonisjs/cli/index.js' -> '/usr/bin/adonis'
npm ERR!  { Error: EACCES: permission denied, symlink '../lib/node_modules/@adonisjs/cli/index.js' -> '/usr/bin/adonis'
npm ERR!   cause: 
npm ERR!    { Error: EACCES: permission denied, symlink '../lib/node_modules/@adonisjs/cli/index.js' -> '/usr/bin/adonis'
npm ERR!      errno: -13,
npm ERR!      code: 'EACCES',
npm ERR!      syscall: 'symlink',
npm ERR!      path: '../lib/node_modules/@adonisjs/cli/index.js',
npm ERR!      dest: '/usr/bin/adonis' },
npm ERR!   stack: 'Error: EACCES: permission denied, symlink \'../lib/node_modules/@adonisjs/cli/index.js\' -> \'/usr/bin/adonis\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'symlink',
npm ERR!   path: '../lib/node_modules/@adonisjs/cli/index.js',
npm ERR!   dest: '/usr/bin/adonis' }
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 (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/adroitcoder/.npm/_logs/2018-10-06T07_39_51_484Z-debug.log
curveball
  • 3,873
  • 13
  • 33
  • 40

1 Answers1

1

For EACCES errors you should either reinstall npm with a Node version manager or change npm's default directory manually.

Credit: https://docs.npmjs.com/getting-started/fixing-npm-permissions

Nir Alfasi
  • 49,889
  • 11
  • 75
  • 119