(A long time ago) when I installed dfx
for the first time I had issue with permission too on my mac.
I got these fixed by running few chown
and chmod
in order to run it without sudo
(as for npm
I guess it’s safer to not use it). Documented these in this thread → Permissions on OSX - #2 by peterparker
Hope it helps a bit.
Happy new year