islandguy islandguy - 2 years ago 236
Node.js Question

YO is not running

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

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

Answer Source

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 yo@1.4.6

This should get you going.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download