Search code examples
vue.jsnpmlinux-mint

How to fix the problem with vue.js instalation


Good evening everybody! I'm trying to install vue.js on my linux mint using npm. When I run the simple command given in vue tutorial:

npm install -g @vue/cli

After some warnings the following errors appear in terminal:

 npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib'
npm ERR!  { [Error: EACCES: permission denied, access '/usr/local/lib']
npm ERR!   stack:
npm ERR!    'Error: EACCES: permission denied, access \'/usr/local/lib\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib' }
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.

npm ERR! A complete log of this run can be found in:
npm ERR!     and path to error log here

I understand, that "the operation was rejected by my operation system" But I have no idea, how to fix it. I will be grateful if someone helps me with this, as I suppose simple problem


Solution

  • try sudo npm install -g @vue/cli