I've been trying to get npm configured to where I don't need to run npm using sudo however with everything I try every time I run an npm command I get the following error
npm WARN checkPermissions Missing write access to /Users/<MYUSERNAME>/.npm-global/lib/node_modules
This isn't the full error just edited for brevity.
Here's what I've tried so far: Installed NVM uninstalled then reinstalled node
Tried changing the permissions on the hidden folder
chmod 755 /Users/<MYUSERNAME>/.npm-global/lib/node_modules
Followed the instructions from npm on how to change the global path https://docs.npmjs.com/getting-started/fixing-npm-permissions#option-2-change-npms-default-directory-to-another-directory
And finally tried to change ownership of the directory using CHOWN
and still nothing. Any advice on what I am doing wrong. I've been pouring through Git issues reading what people are doing and still no luck.
Thanks in advance,