Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

yo is not running

Tags:

node.js

yeoman

yo

I'm getting an error when trying to run yeoman. Just a simple version request. I just installed Node.js using the mac installer v6.2.0 and ran the following:

npm install -g yo

After getting no errors on install I ran yo -version:

/usr/local/lib/node_modules/yo/lib/cli.js:18  
var tabtab = new (require('tabtab').Commands.default)({  
             ^

TypeError: require(...).Commands.default is not a constructor
    at Object.<anonymous> (/usr/local/lib/node_modules/yo/lib/cli.js:18:14)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Function.Module.runMain (module.js:575:10)
    at startup (node.js:160:18)
at node.js:449:3
like image 654
islandguy Avatar asked May 21 '16 16:05

islandguy


2 Answers

I also found the same problem with latest version of yo. Here is what I did to get me going.

  1. Uninstall latest version of yo npm uninstall -g yo
  2. Install version 1.4.6 with this command npm i -g [email protected]

This should get you going.

like image 167
user3680963 Avatar answered Oct 14 '22 00:10

user3680963


This has now been fixed. See the issue on Github here.

like image 35
AbdulFattah Popoola Avatar answered Oct 14 '22 00:10

AbdulFattah Popoola