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
Wallaby can't resolve module with require.main.require inside of a node_module #2061
Comments
Looks like this a problem for other testing libraries so they may fix it on their side JetBrains/svg-sprite-loader#309 However if other modules end up using require.main.require, this would still break Wallaby. |
Thanks for reporting this issue. We've updated wallaby to patch require.main paths so that this works correctly in the future. The fix is available in v1.0.681 of wallaby core. |
Awesome! I can go ahead and close then. |
@smcenlly I am still seeing this problem on v1.0.688. Seeing this in the logs.
|
We've just released an update that should fix this for you. Please update to the latest version of core (v1.0.689). If you find that wallaby doesn't automatically update for you after restarting your editor, you can perform a forced update. |
Still broken on v1.0.689
|
It looks like the problem is deeper than what we originally duplicated. Wallaby spawns a number of node worker processes with different contexts and the original fix only addresses one of three contexts. To unblock you for now while we investigate further, can you please try updating your wallaby.js configuration as detailed below:
|
I'll be on vacation for two weeks so no worries about a temp workaround. If there is anything I can do to help when I get back, please let me know, |
After a bit more investigation, if the workaround works for you, that's going to be our recommendation for handling this particular scenario. Could you please confirm that it's working for you? |
@smcenlly Just got back and looks like that works! I appreciate the help. |
I recently just upgraded https://github.com/kisenka/svg-sprite-loader and they started using
require.main.require
to detect the webpack version. They are attempting to load in the webpack package.json file to then parse the version number. This runs fine if running the tests with mocha via command line, but Wallaby can't find the right Webpack module. I can't think of any solid workaround besides downgrading svg-sprite-loader because this happens in the same process as the Webpack build.The text was updated successfully, but these errors were encountered: