Open smmoosavi opened 3 years ago
Just had this issue. It's because dynamic require
s seem to also load from the virtual filesystem made by mock-fs
, so it can't find node_modules
by default. You'd have to do something along the lines of
mock({
"node_modules": mock.load(resolve(projectRoot, 'node_modules')),
.
.
.
});
code:
error: