-
Notifications
You must be signed in to change notification settings - Fork 251
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
Cannot find module 'setupDevtools' from 'setup.js' #717
Comments
Thanks for opening this issue! What happens when you remove the |
@simondel
If I remove If I comment all this file, I have the following error
But in this case jest doesn't work either. It seems to be an older issue with jest and react-native (https://www.google.fr/search?q=setupdevtools+from+setup.js)
NB : I found the
|
Would there be a way for you to share code? Or is the project based on a public quickstart project that we could perhaps use to find the issue? |
@simondel
Jest works
Stryker does not
|
Awesome thanks! I'll try it out tomorrow :) |
I'm having some issues reproducing this. When I run your repo on my machine (node 8, npm 5, Windows 10) I get the following message from Stryker:
This got me wondering, why does your project use babel? Can't you use the typescript compiler to transform your js files? In the case of Stryker the config After I removed babel from the project, I did get an error that relates to the error you have:
I'll investigate this further. |
@simondel Thanks for the time you takes I don't really know and can't explain why we need babel. We are starting using typescript on our project and still having some js files. For example,
How did you remove babel from the project ? And I'm not sure because I could only try tomorrow, but I think my real react-native project won't correctly run and build on IOS and Android without babel. For information, we're using this package. I'll check tomorrow. But I'm surprised the provided repository does not produce error about setupDevtools on your computer. I need to comment the
In this case, if I remove
It works !!! But then, I removed
Still works ! Why ? It makes me confused. Ok, if I go back and look at the preset error.
But then, if i run
I found this issue and try quickly
I'll will keep investiguate tomorrow or this week-end. But I don't think that is a solution for me cause during this time,
And if I don't comment the |
Ok, seems like I don't need babel for running application, but I need it for using jest, https://github.com/kulshekhar/ts-jest#react-native |
I have the same error with:
And Jest config:
|
@VincentLanglet did you find any solution to this? Facing the same issue |
@oferRounds No sorry |
I will try to figure out what's wrong before this year is done. Thanks for your patience |
I've spent a couple of hours trying to reproduce this issue, but couldn't. I'm not experienced with Jest or React. Can anyone create a public repo that reproduces this issue? Any help will be much appreciated. We really want these kind of use cases to work before we publish version 1. Thanks in advance ❤️ |
I had this old repo https://github.com/VincentLanglet/StrykerTest But now it give the error :
|
Yeah, I get that error as well, with regular tests. Any other reproduction repo? Or can you update it to work again? Sorry, but really can't do much without reproduction steps. |
@nicojs I have this very light repo: https://github.com/mickaelw/test-stryker Sorry in advance for iOS and Android folders |
@mickaelw I've cloned the repo, but
Any ideas? |
@nicojs yes, I think it's rxjs-tslint dependency. You can remove all ^ in the package.json and re install all package with the good version Let me know if it's better ;) |
@mickaelw It's an issue with type in your dependencies. I made a PR, it's not the best fix but it's enough. @nicojs In this PR, yarn test works for me, but not yarn stryker |
I've been able to reproduce the error without Stryker, just plain jest + react-native. I've opened up an issue at react-native. Hopefully there is a solution. facebook/react-native#22823 |
@nicojs Great job ! Thanks |
@nicojs Cool! Do you have a workaround? |
They closed the issue and redirect us to : It seems to be a jest issue. But if it is, why did this happen in this context with react-native and not automatically with react or other libraries @nicojs ? |
@VincentLanglet you're closing this issue, is it fixed for you? I don't know why only react-native is effected by this. |
@nicojs Since it's a react-native/jest issue, I was thinking a stryker issue was not necessary. |
Ok, in that case I would like to keep this issue open for now, so we don't lose track of it. The good news is that a lot of people seem effected. So hopefully, it will be fixed soon. As a workaround, I guess you could specify files and disable symlinkNodeModules. The files: [
'*.*',
'node_modules/react-native/**',
'node_modules/other-required-node-module/**',
'src/**',
'test/**'
] However, it will take a lot of time to populate each sandbox. You should be careful to not include too much |
Any updates on this issue? Or any workaround? |
I'm afraid the workaround that I specified is the only one for now. The issue in Jest is being tracked here: |
In hindsight, setting |
I set the
Any idea how to make it works? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Although marked as stale and closed, this bug is still present. Luckily #2706 solves this. It will be released in v4.4 🎉 |
It just got released. See docs here: https://stryker-mutator.io/docs/stryker/configuration/#inplace-boolean |
Summary
I use a react-native project with typescript and jest.
When I tried to install stryker and run it, I have the following message :
But when I use jest, I don't have any error.
Is something wrong with my config or is it a real issue ?
Stryker config
Stryker
Jest
Babel
Stryker environment
But also
Your Environment
The text was updated successfully, but these errors were encountered: