Closed Teamop closed 6 years ago
Seeing similar error after upgrading to RC1:
03 09 2018 20:55:24.766:ERROR [karma]: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string
at assertPath (path.js:39:11)
at Object.join (path.js:1158:7)
at Plugin.<anonymous> (/home/foo/projects/bar/node_modules/karma-webpack/lib/karma-webpack.js:284:70)
at Plugin.readFile (/home/foo/projects/bar/node_modules/karma-webpack/lib/karma-webpack.js:303:5)
at process._tickCallback (internal/process/next_tick.js:176:11)
Released in 4.0.0-rc.2
🎉
With #347 changes, now get error:
TypeError: Path must be a string. Received undefined
. After my research, there are 3 places will throw this error:Two in the
readFile
, L311, L337, both arethis.outputs.get(file)
--- the changes I made here is to map the file path to the entry path, so that can getting the file from the outputs. Example, changes fromtest\unit\karma-test-shim
totest/unit/karma-test-shim
One in the
createPreprocesor
L386, this linewebpackPlugin.outputs.get(filename);
--- for this one, the file is already the real file path, if replaced with the webpack stats one, the karma web server cannot find the file 404. Example here, changes fromC:/project/test/unit/karma-test-shim.js
toC:\project\test\unit\karma-test-shim.js
Type
Issues
SemVer