Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to install yeoman generators

I am very new to yeoman. I tried running the lessapp yeoman generator, but ran into some weird error. I thought may be it was due to the generator and tried installing another generator bootstrap-less but still it throws the same error. The error comes when I either try to hit the space button or the arrow keys or on hitting the enter button.

I am placing the error stack below.

Please let me know where I am going wrong.

I am using npm version - 2.1.6 and node - v0.10.33 version on mac 10.9.5

 _-----_
    |       |    .--------------------------.
    |--(o)--|    |    Welcome to Yeoman,    |
   `---------´   |   ladies and gentlemen!  |
    ( _´U`_ )    '--------------------------'
    /___A___\    
     |  ~  |     
   __'.___.'__   
 ´   `  |° ´ Y ` 

Out of the box I include HTML5 Boilerplate, jQuery, and a Gruntfile.js to build your app.
? What more would you like? (Press <space> to select)
❯◉ Bootstrap
 ◯ Less
 ◯ Modernizr


/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/inquirer/node_modules/rx/dist/rx.all.js:9229
        throw e;
              ^
ReferenceError: parent is not defined
    at AnonymousObserver._onNext (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/inquirer/node_modules/rx/dist/rx.all.js:4259:63)
    at AnonymousObserver.Rx.AnonymousObserver.AnonymousObserver.next (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/inquirer/node_modules/rx/dist/rx.all.js:1863:12)
    at AnonymousObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/inquirer/node_modules/rx/dist/rx.all.js:1795:35)
    at AutoDetachObserverPrototype.next (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/inquirer/node_modules/rx/dist/rx.all.js:9226:23)
    at AutoDetachObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/inquirer/node_modules/rx/dist/rx.all.js:1795:35)
    at Subject.Rx.Subject.addProperties.onNext (/BANL1291ec423:bootstrap-less pl1$
like image 357
zilcuanu Avatar asked Mar 17 '23 16:03

zilcuanu


2 Answers

I've got this solved! As benurb suggested here https://github.com/yeoman/yo/issues/247 I manually patched rx.all.js in my C:\Program Files\nodejs\node_modules\yo\node_modules\yeoman-environment\node_modules\inquirer\node_modules\rx\dist

You should replace

shouldRun = predicate.call(thisArg, value, count++, parent);

with

shouldRun = predicate.call(thisArg, value, count++, source);

on the line 4259

like image 92
deniss-s Avatar answered Mar 26 '23 03:03

deniss-s


Here's the answer I updated just now to this: Issue with selection options on MAC terminal (scaffloding web application using YOMEN)

Time of writing: [2014.12.11 1:42AM PST]

It is due to the rx.js, yeoman's dependency, released broken version.

The yeomon mod has patched, but it is still not working yet. After they successfully patch to the right version, try this:

npm uninstall -g yo
npm cache clean
npm install -g yo

Here are the related links:

  • https://github.com/yeoman/yo/issues/247
  • https://github.com/Reactive-Extensions/RxJS/issues/434

This issue was resolved that day. My answer is no longer relevant...

like image 27
projun14 Avatar answered Mar 26 '23 02:03

projun14