1

When i execute the npm i -g typescript typescript-language-server this is what the terminal return and dont install the language

npm WARN checkPermissions Missing write access to /usr/local/lib<br>
npm WARN notsup Unsupported engine for fs-extra@10.0.0: wanted: {"node":">=12"} (current: {"node":"10.19.0","npm":"6.14.4"})<br>
npm WARN notsup Not compatible with your version of node/npm: fs-extra@10.0.0<br>

npm ERR! code EACCES<br>
npm ERR! syscall access<br>
npm ERR! path /usr/local/lib<br>
npm ERR! errno -13<br>
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib'<br>
npm ERR!  { [Error: EACCES: permission denied, access '/usr/local/lib']<br>
npm ERR!   stack:<br>
npm ERR!    'Error: EACCES: permission denied, access \'/usr/local/lib\'',<br>
npm ERR!   errno: -13,<br>
npm ERR!   code: 'EACCES',<br>
npm ERR!   syscall: 'access',<br>
npm ERR!   path: '/usr/local/lib' }<br>
npm ERR! <br>
npm ERR! The operation was rejected by your operating system.<br>
npm ERR! It is likely you do not have the permissions to access this file as the current user<br>
npm ERR!<br> 
npm ERR! If you believe this might be a permissions issue, please double-check the<br>
npm ERR! permissions of the file and its containing directories, or try running<br>
npm ERR! the command again as root/Administrator.<br>

npm ERR! A complete log of this run can be found in:<br>
npm ERR!     /home/alfredo/.npm/_logs/2021-07-29T22_20_46_385Z-debug.log'<br>
F R E D M
  • 11
  • 1

1 Answers1

0

It’s a permission error, which means you don’t have write access to /usr/local/lib folder.

To solve it. Run this command:

sudo chown -R $USER /usr/local/lib

Carol-Theodor Pelu
  • 906
  • 2
  • 10
  • 26