Unable to run with node-icecream package

Trying in to test with node-icecream package. I copied the code straight from npm. It fails when I run it in runkit.

However, if I try the code in repl.it it runs (https://repl.it/@mohrepl/Test#index.js).

const ic = require('node-icecream')();

function foo() {
    ic();

    // For example purposes only
    if (true) {
        ic();
        return 'bar';
    }

    ic();
    return 'something is wrong';
}

ic(foo());

That package relies on callsite and fs to read the file that contains your code, and I think this works differently on RunKit compared to Repl.it. Take a look at this thread: Getting a handle to __filename/current script?