
Santiago Tovar Riscanevo
PreguntaHola al instalar sass me lanza este error alguien me puede ayudar?
$ npm install -g sass
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 ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules’
npm ERR! [Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’] {
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘access’,
npm ERR! path: '/usr/local/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/juand.tovar/.npm/_logs/2020-07-28T02_12_36_105Z-debug.log
git_prompt_info:5: character not in range
- Agregar el comando sudo al inicio de tu sentencia suele funcionar para solucionar cualquier problema con permisos. En consola pones:
- Si estas usando power shell o alguna otra consola en windows deberías entonces ejecutarla como administrador y luego poner tu comando:
Rodolfo Malpica Delgado
Funciona con:
sudo npm -g install sass
Yo lo tuve que poner dos veces.

Antonio Cortes Avila
Me parece que en Mac es el siguiente comando:
brew install sass/sass/sass

Santiago Tovar Riscanevo
estoy usando Mac

Marco Alejandro Rodriguez Ferrer
Saludos! Creo que el problema está en que no estás dándole permisos de escritura al npm. Debería bastar con:
En Linux
sudo npm install -g sass
En windows
npm install -g sass
Alejandro Barba
Estás usando linux? Si es así entonce utiliza sudo npm install -g sass