0

I have difficulties in installing Sass. I am using the Terminal, anyway, when i use npm install -g sass, I am getting error in log file. Here's which answer I receive:

npm WARN checkPermissions Missing write access to /Users/dagilo/desktop/npm-global/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /Users/dagilo/desktop/npm-global/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/Users/dagilo/desktop/npm-global/lib/node_modules'
npm ERR!  [Error: EACCES: permission denied, access '/Users/dagilo/desktop/npm-global/lib/node_modules'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/Users/dagilo/desktop/npm-global/lib/node_modules'
npm ERR! }
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!     /Users/admin/.npm/_logs/2021-02-01T14_18_27_655Z-debug.log
iMac-de-admin-3:Dagilo admin$ npm install -g sass
npm WARN checkPermissions Missing write access to /Users/dagilo/desktop/npm-global/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /Users/dagilo/desktop/npm-global/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/Users/dagilo/desktop/npm-global/lib/node_modules'
npm ERR!  [Error: EACCES: permission denied, access '/Users/dagilo/desktop/npm-global/lib/node_modules'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/Users/dagilo/desktop/npm-global/lib/node_modules'
npm ERR! }
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!     /Users/admin/.npm/_logs/2021-02-01T14_19_25_392Z-debug.log

Any idea how to solve this?

StefaDesign
  • 929
  • 10
  • 19
Dagilo
  • 3
  • 1

1 Answers1

0

It's common permission issue in MAC OS so as log suggests you might need to use command sudo npm install -g sass to have privileges this installation requires. Your log above says:

If you believe this might be a permissions issue, please double-check the permissions of the file and its containing directories, or try running the command again as root/Administrator.

In case you share computer or its company owned, you might need Administrator account or Administrator help to do so.

Additionally here is one relative answer and solution :NPM modules won't install globally without sudo

StefaDesign
  • 929
  • 10
  • 19