I'm trying to add Karma to a project and failing at the webpack step.
When I try configure webpack to be called by Karma I get an error:
07 09 2018 13:52:41.487:ERROR [karma]: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
at assertPath (path.js:39:11)
at Object.join (path.js:434:7)
at webpackPlugin.readFile (C:\Users\Toby\Documents\GitHub\cncjs-testing2\node_modules\karma-webpack\lib\karma-webpack.js:318:30)
at Plugin.<anonymous> (C:\Users\Toby\Documents\GitHub\cncjs-testing2\node_modules\karma-webpack\lib\karma-webpack.js:276:17)
at Plugin.readFile (C:\Users\Toby\Documents\GitHub\cncjs-testing2\node_modules\karma-webpack\lib\karma-webpack.js:293:9)
at process._tickCallback (internal/process/next_tick.js:61:11)
I (think) I have narrowed this down to the following line:
let outputPath = webpackPlugin.outputs[filename];
Where
webpackPlugin.outputs = { 'test/web/tests.webpack.jsx': 'output.js' }
and
filename = test\web\tests.webpack.jsx
So the slashes are round the wrong way but I don't know what I've done to cause this in the configuration.
For anybody that's interested, the project is CNCjs