Open krimple opened 8 years ago
+1 ... going to take a look now
+1 same for me as well
same error as @thetwosents and the code works with learnyounode run program.js
.
program.js
contains:
var mymodule = require('./mymodule');
mymodule(process.argv[2], process.argv[3],function (err,file) {
if(err) { throw err; }
console.log(file);
});
mymodule.js
contains
var fs = require('fs');
var path = require('path');
module.exports = function (dir,ext,callback) {
fs.readdir(dir, function (err, files) {
if (err) { return callback(err); }
var reqExt = '.' + ext;
files.forEach(function (file) {
if (path.extname(file) === reqExt){
callback(null,file);
}
});
});
};
+1, I am also seeing this error output.
I was able to solve it by following: https://github.com/workshopper/learnyounode/issues/395
YMMV.
I'm on OS X El Capitan - and getting an interesting behavior and wondering if it's me or the scripts.
The output is:
[Error: testing] ERROR: There was a problem printing the solution files: testing
when I execute the verify against my main node source file. It works, and calling it with run brings back the correct output, even with verify as well, but this error occurs at the end:
node version: 4.2.3
Sources
file-list-runner.js
file-list.js
I execute with: