npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/apollo-codegen/node_modules/string-width
npm ERR! path /usr/local/lib/node_modules/apollo-codegen/node_modules/ansi-regex
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/apollo-codegen/node_modules/ansi-regex'
npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules/apollo-codegen/node_modules/ansi-regex'
npm ERR! stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules/apollo-codegen/node_modules/ansi-regex\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules/apollo-codegen/node_modules/ansi-regex' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/ldurazo/.npm/_logs/2018-01-26T00_54_08_679Z-debug.log
Command /bin/sh failed with exit code 243
I think I had such error
And I used sudo chmod -R 777 /usr/local/lib/node_modules/apollo-codegen/ to give all rights
I tried that, but i found better solution, just type on terminal sudo chown -R $(whoami):admin /usr/local/lib/node_modules/, thanks bro 馃憤 @Michael-dyko
Most helpful comment
I tried that, but i found better solution, just type on terminal
sudo chown -R $(whoami):admin /usr/local/lib/node_modules/, thanks bro 馃憤 @Michael-dyko