Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does 'mock-fs' work on WSL1 ? #347

Open
AncientSwordRage opened this issue Dec 25, 2021 · 2 comments
Open

Does 'mock-fs' work on WSL1 ? #347

AncientSwordRage opened this issue Dec 25, 2021 · 2 comments

Comments

@AncientSwordRage
Copy link

I've tried to require it in my node.js test but I'm getting this error:

Test suite failed to run

    TypeError: Cannot read properties of undefined (reading 'read')

      2 | const { default: axios } = require('axios');
      3 | const fs = require('fs');
    > 4 | const mockFs = require('mock-fs');

I haven't seen anything about this error, nor using 'mock-fs' on WSL1.. I've removed the const fs = require('fs') and it still errors before running any tests.

Is there something I'm doing wrong or is it not compatible with WSL1?

@blutorange
Copy link

@AncientSwordRage

Might be the same as #344 , or at least related to it? I'm getting the error too (see my comment in that issue), but I'm using Ubuntu. As far as I could find out, it seems to happen only with yarn -- are you using yarn too?

@AncientSwordRage
Copy link
Author

AncientSwordRage commented Jan 6, 2022

@blutorange nah I'm using npm. I'm wondering if they're still related somehow though?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants