codymikol / karma-webpack

Karma webpack Middleware
MIT License
830 stars 222 forks source link

[4.0.0-rc.4] Cannot create property 'colors' #375

Closed daKmoR closed 5 years ago

daKmoR commented 5 years ago

Using 4.0.0.-rc.4 I get an error Can not load "webpack"!

Expected Behavior

Successful compile as with 4.0.0.-rc.2 https://circleci.com/gh/open-wc/open-wc/291

Actual Behavior

with 4.0.0.-rc.4

Can not load "webpack"! TypeError: Cannot create property 'colors' on string 'errors-only'

https://circleci.com/gh/open-wc/open-wc/290

matthieu-foucault commented 5 years ago

Looks like a regression introduced by #356 , fixing this ASAP

matthieu-foucault commented 5 years ago

I'm pretty sure the PR above fixes it, but I can't even reproduce the bug in the first place. I tried to add 'use strict' to my karma.conf.js, but everything works for me... @daKmoR can you test with karma-webpack@webpack-contrib/karma-webpack#fix-stringstats-color

daKmoR commented 5 years ago

thx for the fast reply :) I am currently on the go but I will check it latest by tomorrow :)

not sure yet how as locally it's flaky - it fail like only 10% of the time... on circleci it fails always... I can probably publish a temporary version somewhere and still run it through circleci... anyways I think I will figure something out

daKmoR commented 5 years ago

ok did a new install of all node_modules and had the error now locally too (also I had it now always)

the proposed fix in https://github.com/webpack-contrib/karma-webpack/pull/376 solves it indeed 👍