I'm trying to load a "local" file in a stackblitz project and I'm getting the following error
Error: ENOENT: No such file or directory., '/~/small.flb'
from this code
fs.readFile(__dirname + "/small.flb", function(err, data) {
if (err) {
throw err;
}
console.log(data.toString());
});
It seems like it has something to do with the virtualization, if you check the console in this Stackblitz you'll see the small.flb
is not listed (note ./small.flb
doesn't work either w/o __dirname
)