Unable to install NativeScript


#1

I’m trying to install NativeScript and I am getting this error when I do

npm i -g nativescript

npm ERR! Windows_NT 10.0.14393 npm ERR! argv “C:\Program Files\nodejs\node.exe” “C:\Users\John\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js” “i” “-g” “nativescript” npm ERR! node v8.9.1 npm ERR! npm v4.0.3

npm ERR! Cannot read property ‘assert-plus’ of undefined

. . .

npm ERR! Cannot read property ‘minimist’ of undefined

when I run this command on a Mac, I get:

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

Does anyone know how to work around this? I have the latest version of Node and npm. Maybe that is my problem? Does anyone know what version would work? Thanks!


#2

@jbaima Hi!
If you are on node 9, downgrade to node 8 and try agian.


#3

I did not realize it but I did not have the latest npm on Windows. When I updated that to 5.5.1, it worked. Mac would not work with 5.5.1. I tried 4.1.1 and it worked.


#4

alrighty! glad that it worked for you :slight_smile: