timoxley / adventure-map

Simple exercise loader & generators for substack/adventure.
MIT License
19 stars 3 forks source link

Generated adventures print a stacktrace at the end of problem printout #4

Closed davidmason closed 9 years ago

davidmason commented 9 years ago

I am getting an exception from the initial boilerplate code that adventure-map generates. It looks like it is triggered from a few levels down the dependency tree.

I am using Fedora 20, so I suspect it may be a platform-specific issue. Can someone have a go at reproducing this on a different OS?

To reproduce:

  1. run npm init -f
  2. run npm install --save adventure-map
  3. run adventure-map init
  4. add name+path pair to package.json: "exercises": { "Getting Started": "exercises/example" }
  5. run ./index.js
  6. select "Getting Started" and press Enter

Generates the following output


    ES5-WORKSHOP                                                       
    ------------                                                       
    Getting Started                                                    
    -----------------                                                  
    HELP                                                               
    EXIT                                                               

Lengthy introduction of concepts up here.

-------------------------------------------------------------------------------

# Task

Concise description of task.

## Example

    // example of usage

## Arguments

  * arg1: Description including data type

## Conditions

  * Do and
  * Do not

## Hints

  * Remember to give hints

## Resources

  * http://google.com

/home/damason/src/davidmason/es5-workshop

tty.js:65
  this._handle.setRawMode(flag);
               ^
TypeError: Cannot call method 'setRawMode' of null
    at ReadStream.setRawMode (tty.js:65:16)
    at Interface._setRawMode (readline.js:165:23)
    at new Interface (readline.js:126:10)
    at Object.exports.createInterface (readline.js:39:10)
    at Object.Interface.createInterface (/home/damason/src/davidmason/es5-workshop/node_modules/adventure-map/node_modules/inquirer/node_modules/readline2/index.js:38:21)
    at PromptUI.UI (/home/damason/src/davidmason/es5-workshop/node_modules/adventure-map/node_modules/inquirer/lib/ui/baseUI.js:23:40)
    at new PromptUI (/home/damason/src/davidmason/es5-workshop/node_modules/adventure-map/node_modules/inquirer/lib/ui/prompt.js:26:8)
    at Object.inquirer.prompt (/home/damason/src/davidmason/es5-workshop/node_modules/adventure-map/node_modules/inquirer/lib/inquirer.js:39:16)
    at setup (/home/damason/src/davidmason/es5-workshop/node_modules/adventure-map/index.js:66:14)
    at null._onTimeout (/home/damason/src/davidmason/es5-workshop/node_modules/adventure-map/index.js:43:9)
davidmason commented 9 years ago

I am still seeing the stack trace on Fedora 20, so I will look into it further.