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

Error "Cannot find module 'mem-fs-editor'" when invoking the run-function #138

Closed
manuth opened this issue Feb 25, 2021 · 1 comment
Closed

Comments

@manuth
Copy link

manuth commented Feb 25, 2021

Since mem-fs-editor is not a dependency of yeoman-test, this piece of code causes an error sometimes:

const MemFsEditor = require('mem-fs-editor');

Me, in my case, I have yeoman-test installed (for testing) and yeoman-environment for injecting version ^3.0.0 into yeoman-test (as recommended in the README).

For me, mem-fs-editor is being installed here: node_modules/yeoman-environment/node_modules/mem-fs-editor
yeoman-test, naturally, is being installed here: node_modules/yeoman-test.

When trying to run yeoman-test I get an error: Cannot find module 'mem-fs-editor'

yeoman-test assumes that mem-fs-editor is located directly in my node_modules folder, but that's not the case for me.
Personally I'd say the problem can be solved by adding mem-fs-editor to the dependencies of yeoman-test. I don't really want to fiddle around with my package-lock.json file

@mshima
Copy link
Member

mshima commented Mar 13, 2021

Fixed in 5.1.0

@mshima mshima closed this as completed Mar 13, 2021
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