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

Runtime Error Error: Cannot find module 'jest-cli/src/lib/moduleMocker' #17

Open
lauterry opened this issue Apr 25, 2016 · 2 comments
Open

Comments

@lauterry
Copy link

Hello

I'm using Jest-cli 11.0.2 with JestPack 0.1.1 and I got the following error :

Error: Cannot find module 'jest-cli/src/lib/moduleMocker'
    at Function.Module._resolveFilename (module.js:326:15)
    at Function.Module._load (module.js:277:25)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/Users/lauthierry/workspace/front/node_modules/jestpack/ModuleLoader.js:8:20)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)

It seems that the moduleMocker have to be required like this :

const moduleMocker = require('jest-mock');

instead of

const moduleMocker = require('jest-cli/src/lib/moduleMocker');

Can you publish a new version compatible with Jest-cli 11.0.2 please ?

Best regards

@richardscarrott
Copy link
Member

@lauterry Unfortunately Jestpack doesn't currently support Jest >0.7.x and given all the changes made in recent versions of Jest it'll be hard to fix the problems. Ultimately I don't think the approach Jestpack takes is viable going forward, it's too intrusive.

I've got some simpler ideas for getting Webpack and Jest to work together so I'll try and get an example up soon.

@lauterry
Copy link
Author

hi @richardscarrott

Thanks for your answer.

Can't wait to see your example on how to get Webpack work with Jest.

Cheers

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