I cant install Nativescript on my MAC


#1

I’ve tried so many ways and I cant get the install on my MAC for nativescript:

Auxilia-MacBook:~ Gary$ sudo npm i -g nativescript
Password:
Sorry, try again.
Password:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: abbrev@1.1.0 (node_modules/nativescript/node_modules/fsevents/node_modules/abbrev):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename ‘/usr/local/lib/node_modules/nativescript/node_modules/fsevents/node_modules/abbrev’ -> ‘/usr/local/lib/node_modules/nativescript/node_modules/fsevents/node_modules/.abbrev.DELETE’

npm ERR! path /usr/local/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 ‘/usr/local/lib/node_modules/nativescript/node_modules/fsevents/node_modules/ansi-regex’ -> '/usr/local/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:
npm ERR! /Users/Gary/.npm/_logs/2017-08-02T05_11_42_291Z-debug.log

Please help.


#2

Clean the npm cache: npm cache clean

Try to install nativescript without sudo npm i -g nativescript

Post npm and node versions.


#3

I had the same behaviour after aborded installation (I wasn’t able to run install again).
This simply fixed the issue :
npm remove nativescript -g