Uday Kiran Kota
Uday Kiran Kota

Reputation: 101

YO - unexpected token error

Running yo gives invalid token error. Currently using Node, NPM versions as given below. node -v v4.5.0 npm -v 2.15.9

$ yo
node_modules/yo/node_modules/yeoman-environment/lib/resolver.js   
let lookup = path.join(...parts.slice(0, i + 1), 'node_modules');
SyntaxError: Unexpected token ...
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> 

Upvotes: 4

Views: 4134

Answers (2)

Michael Dumars
Michael Dumars

Reputation: 1

Make sure your node major version matches the node version you installed yeoman using.

Upvotes: 0

Uday Kiran Kota
Uday Kiran Kota

Reputation: 101

things worked after moving to node -v v8.11.1 and npm -v 5.6.0

Upvotes: 6

Related Questions