rattus
rattus

Reputation: 37

Install/test problem with full Nativescript CLI install

I've done an apparently clean install of the Nativescript CLI on MacOS X, yet when I run tns doctor it fails:

bash-3.2$ /usr/local/lib/node_modules/nativescript/bin/tns doctor

/usr/local/lib/node_modules/nativescript/lib/common/verify-node-    version.js:32
            console.warn((`${os.EOL}${nodeWarning.message}${os.EOL}`).yellow.bold)
                  ^
SyntaxError: Unexpected token ILLEGAL
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous>     (/usr/local/lib/node_modules/nativescript/bin/tns:8:1)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)

Upvotes: 0

Views: 144

Answers (2)

rattus
rattus

Reputation: 37

The former problem was due to an obsolete version of node,js; installation of node 10 (LTS) solved it.

The latter problem was due to a writhing nest of pythons - the command 'python' linked to python 2.5, while the install script invoked python 2.7 and its attendant user addons. Relinking 'python' to the python 2.7 executable fixed the issue.

Upvotes: 0

Vladimirov
Vladimirov

Reputation: 421

The problem is that you are using very old Node.js version. NativeScript CLI requires at least Node.js 6, but I recommend you to use current LTS - Node.js 10. Node.js 0.10.29 (which is your current version) does not support the syntax used in NativeScript CLI's codebase.

Upvotes: 1

Related Questions