Jump to content
Sign in to follow this  
xzolsu

npm: Error: EACCES: permission denied, access.

Recommended Posts

При выполнении:

 npm install -g npm 

Получаем:

  • Error: EACCES: permission denied, access '/usr/local/lib/node_modules/npm/node_modules/...'
  • npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/deep-extend
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/is-ci
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/is-retry-allowed
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/minimist
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/mkdirp
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/rc/node_modules/minimist
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/rc
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/registry-auth-token
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/rimraf
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/widest-line
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/rc/node_modules
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
    npm ERR! code EACCES
    npm ERR! syscall access
    npm ERR! path /usr/local/lib/node_modules/npm/node_modules/deep-extend
    npm ERR! errno -13
    npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/npm/node_modules/deep-extend'
    npm ERR!  { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules/npm/node_modules/deep-extend']
    npm ERR!   stack:
    npm ERR!    'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules/npm/node_modules/deep-extend\'',
    npm ERR!   errno: -13,
    npm ERR!   code: 'EACCES',
    npm ERR!   syscall: 'access',
    npm ERR!   path: '/usr/local/lib/node_modules/npm/node_modules/deep-extend' }
    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!     /home/x/.npm/_logs/2020-03-31T16_06_16_613Z-debug.log

    image.thumb.png.b45b834aff4d64bf8c31634584ad06fe.png

Решение:

use sudo:

sudo npm install -g npm 

image.png.7cb41c322cf797792976615b8412d85f.png

 

 

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

Error: EACCES: permission denied, access

Такие сообщения надо конечно читать, а не в гугле искать.

 

Edited by hatec

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...