【问题标题】:Issue with selection options on MAC terminal (scaffloding web application using YOMEN)MAC 终端上的选择选项问题(使用 YEOMAN 搭建脚手架 Web 应用程序)
【发布时间】:2014-12-11 06:36:57
【问题描述】:

我正在我的新 MAC 机器上使用 YOMEN 创建一个 webapp,但终端不允许我使用空格键选择选项。这是我得到的:

================================================ =======================

     _-----_
    |       |    .--------------------------.
    |--(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
 ◯ Sass
 ◯ 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 (/Admins-MacBook-Pro-3:V1 jyotipuri$ 

================================================ ================

请帮忙。

【问题讨论】:

    标签: macos terminal


    【解决方案1】:

    写作时间:[2014.12.11 1:34AM PST]

    由于yeoman的依赖rx.js,发布了损坏的版本。

    yeoman mod 已修补,但仍无法正常工作。 在他们成功修补到正确的版本后,试试这个:

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

    以下是相关链接:

    [更新] - 太平洋标准时间 2014.12.11 凌晨 4:10

    虽然 yeoman 补丁仍然无法正常工作,但修复程序已在 RxJS 中 PR,但尚未合并。

    链接:https://github.com/Reactive-Extensions/RxJS/commit/dcfcf0f537f6a911ed8fca29edb62f415e17bd76

    现在可以直接改源码使用哟。

    您必须向 /usr/local/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/inquirer/node_modules/rx/dist/rx.all.js 授予写入权限.

    然后换行

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

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

    来源:https://github.com/yeoman/yo/issues/247#issuecomment-66600064

    [更新] - 太平洋标准时间 2014.12.11 上午 5:25]

    问题已解决!更新的 RxJS 提交到 npm。

    运行以下命令:

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

    来源:https://github.com/yeoman/yo/issues/247#issuecomment-66617591

    【讨论】:

    • 感谢您提供此信息,我再次重新安装了哟,但问题仍然存在。如果您知道这个问题正在修复,请也告诉我。
    猜你喜欢
    • 2017-03-31
    • 1970-01-01
    • 2016-03-20
    • 2014-01-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-10-25
    • 1970-01-01
    相关资源
    最近更新 更多