-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Description
I'm currently trying to separate the rewire-webpack stuff into its own repository: https://github.com/jhnns/rewire-webpack.
But I'm having three errors related to resolving:
ERROR in ./webpackTests.js
Module not found: Error: Cannot resolve file or directory /home/peerigon/projects/rewire-webpack/lib/rewire.js/test/testModules/moduleA in /home/peerigon/projects/rewire-webpack/test.
@ ./webpackTests.js 5:2-44
ERROR in ./webpackTests.js
Module not found: Error: Cannot resolve file or directory /home/peerigon/projects/rewire-webpack/lib/rewire.js/test/testModules/moduleA in /home/peerigon/projects/rewire-webpack/test.
@ ./webpackTests.js 15:12-53 64:12-53 65:12-53
ERROR in ../~/mocha-loader/web.js
Module not found: Error: Cannot resolve module script in /home/peerigon/projects/rewire-webpack/node_modules/mocha-loader.
@ ../~/mocha-loader/web.js 4:0-32
First two errors are due requiring rewire-files with require("rewire/test/testModules/moduleA") which is valid in node. The last error is because webpack can't find the script-loader. Ok so I checked the mocha-loader and saw the the script-loader is not referenced as dependency. After I've manually installed it in the mocha-loader directory the error looked like:
ERROR in ../~/mocha-loader/~/script-loader!../~/mocha-loader/~/mocha/mocha.js
Module not found: Error: Cannot resolve module raw in /home/peerigon/projects/rewire-webpack/node_modules/mocha-loader/node_modules/mocha.
@ ../~/mocha-loader/~/script-loader!../~/mocha-loader/~/mocha/mocha.js 1:117-225
Which seemed odd to me because the raw-loader is referenced as dependency. Or has the module not been pushed to the npm registry?