Closed jednano closed 9 years ago
FWIW, I did an npm cache clean
before each npm install
command and diffed the two karma-commonjs
installations and the only thing different is their package.json files, which have the whole path in the _from
key, so I'm still utterly confused.
@jedmao I'm afraid that nothing comes to my mind based on your description... If you would put together a small repo with the reproduce scenario maybe someone would have an idea...
@jedmao closing this issue since I haven't heard from you and it is impossible to guess what is going on without minimal reproduce scenario. Feel free to re-open when you've got a small repo that shows the issue.
I know that we're supposed to reference any and all node_modules in the karma.conf.js if we want to require them, but I accidentally stumbled upon a scenario in which that isn't required.
In my case, I'm using browserify as a build process, but I don't have this luxury in karma, because I need to generate a coverage report and browserify messes all that up (unless I'm doing something wrong).
Anyway, long story short, I figured out that adding the following to my package.json allows me to get accurate coverage reports w/o karma-commonjs throwing errors that it can't find a node module:
If I do a normal
npm install --save-dev karma-commonjs
I get errors that I can't find the react node_module, but if I manually specify the github repo and tag name, all is well.The thing that scares me is that I don't know WHY this works! Can you think of anything?
Here's my karma.conf.js: