Closed Hypercubed closed 8 years ago
Can you give me your details on which versions of browserify, watchify and karma-browserify you are using (i.e. snippet in your package.json
)?
I'm using the example in this repo so:
"devDependencies": {
"brfs": "^1.4.0",
"browserify-shim": "~3.8.0",
"karma": "^0.13.0",
"karma-browserify": "^4.2.0",
"karma-jasmine": "^0.1.5",
"karma-phantomjs-launcher": "^0.1.4"
},
npm ls
reports the same versions on both mac and windows:
> npm ls brfs browserify-shim karma karma-browserify karma-jasmine karma-phantomjs-launcher
karma-browserify-example@0.0.0 C:\Users\myusername\workspace\components\karma-browserify\example
├── brfs@1.4.1
├── browserify-shim@3.8.11
├── karma@0.13.15
├── karma-browserify@4.4.0
├── karma-jasmine@0.1.6
└── karma-phantomjs-launcher@0.1.4
At first I believed it was because the 'bundled'
listener (https://github.com/nikku/karma-browserify/blob/master/lib/bro.js#L239) was moved into the if (config.autoWatch)
block in v4.4. But after digging deeper I noticed that bundlePreprocessor
return function (https://github.com/nikku/karma-browserify/blob/master/lib/bro.js#L364) is never being called on windows.
Got it!!!
The browserify-bundle preprocessor is never called because because the bundle doesn't match the '**/*.browserify'
glob. The reason it doesn't match is that my TEMP path contains a dot in the path (C:\Users\myusername\.babun\cygwin\tmp\karma-19378513
).
I can fix this on my end by exporting different path. Perhaps a change to the glob would prevent this issue in the future?
Applied fix from #154
I tested the example (unmodified) on both windows and Mac. On the mac it is working but fails on the windows machine with the output as I posted in this comment (https://github.com/nikku/karma-browserify/issues/84#issuecomment-159465375).
As far as I can tell the
bundlePreprocessor
return function (https://github.com/nikku/karma-browserify/blob/master/lib/bro.js#L364) is never being called on windows. Could be the race condition described here https://github.com/nikku/karma-browserify/issues/57 but changing the debounce time doesn't help. I never seebundle built
on windows.