patkua@work

The intersection of technology and leadership

“fs is not defined” in jasmine-node version 1.0.28

I was using jasmine-node this weekend (package.json says it’s version 1.0.28) and hit this error:

../node_modules/jasmine-node/lib/jasmine-node/cli.js:89
        var existsSync = fs.existsSync || path.existsSync;
                         ^
ReferenceError: fs is not defined

It looks like this has already been reported here as Issue #186. The quick fix is to add the require declaration in yourself at the top of the file.

var fs = require('fs');

2 Comments

  1. I think you meant var fs

  2. Thanks! I’ve updated the post

Leave a Reply

© 2017 patkua@work

Theme by Anders NorenUp ↑