-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Module not found: Error: Cannot resolve module 'module' in c:\app\node_modules\rewire\lib #17
Comments
+1 |
Having exact same issue but with Mocha. |
+1 Mocha |
Has anyone seen any progress on this? I'm having the same issue, using mocha. |
1+ Mocha |
I'm having a near identical problem, the output is:
|
Isn't the plugin meant to go in the webpack config, rather than the karma config? |
I'm having the same issue. Are there're any thoughts on how to make possible bundling tests with rewire for test purposes? |
I ended up using this instead: https://github.com/speedskater/babel-plugin-rewire |
This is a late update, but for anyone still encountering this problem: note that the plugin has to be defined as a webpack plugin, not as a Karma plugin! It should look similar to this: // karma.conf.js
const RewirePlugin = require('rewire-webpack');
module.exports = function (config) {
config.set({
...
webpack: {
...
plugins: [ new RewirePlugin() ]
}
});
} Note that since
To solve this, you can use my fork rensbaardman/rewire-webpack-plugin, which adds webpack 4 support. |
Hi:
I'm trying to put together a react web app with Webpack + Karma that runs the Jasmine unit test spec with rewire-webpack. Whenever I tried running the Karma, the following error occurred:
The following is the configuration for karma.conf.js:
Currently using babel and babel loader version > 6 as defined in package.json
Does anyone happen to know if such configuration with the version lineup here with babel + webpack would work with rewire-webpack?
Many Thanks!
The text was updated successfully, but these errors were encountered: