NativeScript Install fail


after run npm i -g nativescript in MAC

I get EACCESS :permission denied,mkdir’/Users/dev/.local/share/.nativescript-cli’

After clean npm and install nativescript ,

I also get
npm ERR! path /Users/dev/.npm-global/lib/node_modules/nativescript/node_modules/fsevents/node_modules/ansi-regex
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename ‘/Users/dev/.npm-global/lib//nativescript/node_modules/fsevents/node_modules/ansi-regex’ -> '/Users/dev/.npm-global/lib/node_modules/nativescript/node_modules/fsevents/node_modules/.ansi-regex.DELETE’
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:s

Please help me how to run tns in MAC