stevekane / promise-it-wont-hurt

A Workshopper module that teaches you to use promises in javascript
737 stars 219 forks source link

Exercise 9: TypeError: Cannot read property 'pipe' of undefined #134

Open inomdzhon opened 7 years ago

inomdzhon commented 7 years ago

When I run my programm promise-it-wont-hurt run 9-throw-an-error.js I get next error:

/Users/i.mirdzhamolov/.nvm/versions/node/v6.11.4/lib/node_modules/promise-it-wont-hurt/exercises/throw_an_error/exercise.js:31
  tuple(this.submissionStdout.pipe(split()), this.solutionStdout.pipe(split()))
                                                                ^

TypeError: Cannot read property 'pipe' of undefined
    at Exercise.<anonymous> (/Users/i.mirdzhamolov/.nvm/versions/node/v6.11.4/lib/node_modules/promise-it-wont-hurt/exercises/throw_an_error/exercise.js:31:65)
    at next (/Users/i.mirdzhamolov/.nvm/versions/node/v6.11.4/lib/node_modules/promise-it-wont-hurt/node_modules/workshopper-exercise/exercise.js:188:19)
    at /Users/i.mirdzhamolov/.nvm/versions/node/v6.11.4/lib/node_modules/promise-it-wont-hurt/node_modules/workshopper-exercise/exercise.js:195:7
    at /Users/i.mirdzhamolov/.nvm/versions/node/v6.11.4/lib/node_modules/promise-it-wont-hurt/node_modules/workshopper-exercise/execute.js:110:7
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)

But promise-it-wont-hurt verify 9-throw-an-error.js is passed.

My code:

require('es6-promise');

function parsePromised(data) {
  return new Promise(function (fulfill, reject) {
    try {
      fulfill(JSON.parse(data));
    } catch (e) {
      reject(e);
    }
  });
}

parsePromised(process.argv[2])
  .catch(function (error) {
    console.log(error.message);
  });
Aseelaldallal commented 6 years ago

Same here.

Even if my JS file is just console.log("HI!!!!")

Aseelaldallal commented 6 years ago

i just used verify instead of run and it worked fine.

MalutkiSiwy commented 6 years ago

I just deleted this "pipe" and work fine for me didnt crash or something

luucamay commented 4 years ago

@MalutkiSiwy where did you deleted the 'pipe'? I am running with the same issue.

dovhanrg commented 2 years ago

Does anyone figured out what pipe to delete?