Comments (23)
Could you create an example repository that reproduces the issue?
from karma-browserify.
There you go: https://github.com/telegraphinho/karma-browserify-test
There's a bug with browserify installation now(it was introduced a couple of hours ago). The workaround is in the first lines of readme file.
EDIT: removed workaround for browserify dependencies bug. The package updated and it's not needed anymore.
EDIT2: gave it some additional testing. Removed all transforms, mocha-reporter
and other stuff from the mix. Only karma-browserify
, karma-phantomjs-launcher
and jasmine
left. No coffeescript
anymore. Only js. Also tried changing browser to karma-chrome-launcher
. Still no luck. Same error.
Also found this thread: thlorenz/proxyquireify#21 with the very same problem.
There is a solution to the problem in that thread. It seems like that plugin overrode the require at some point. I looked through the source code for karma-browserify and other related plugins but didn't notice such thing.
from karma-browserify.
I'm having the same problem as @telegraphinho, I haven't been able to find a solution... but noticed it's guaranteed to happen with autoWatch enabled and the module being tested (not the test) is edited.
from karma-browserify.
@webfella, for me it happens with the test file itself too. Most often when i add the a new test(it
block). Sometimes when i remove or comment some test or just change something else. But it's not as often as with adding a new one.
from karma-browserify.
Most often when i add the a new test(it block). Sometimes when i remove or comment some test or just change something else. But it's not as often as with adding a new one.
Pretty certain this is not the case. There's no way the effect could be so dependent on your code.
@webfella Are you on OS X as well?
from karma-browserify.
@bendrucker, yeah. Probably just a coincidence. Anyways, that's what i noticed.
Btw,
but noticed it's guaranteed to happen with autoWatch enabled
The problem doesn't happen when autoWatch=false or singleRun=true. That's for sure. Tested multiple times.
from karma-browserify.
@bendrucker Yeah mate, OS X here too. Just at a quick glance, it seems as if the time when it fails it's not bundling correctly as I logged out the buffer and it was only around 450b.
from karma-browserify.
I can verify this is not an issue on Arch Linux.
It may be a caching issue related to the coffee-script transform though (don't know if it actually caches things).
from karma-browserify.
@nikku I'm getting the issue without any transforms in the project. I can put up a version on github with the use case I'm running into in a few hours if that helps.
from karma-browserify.
That would be good.
from karma-browserify.
I just put it up, I can strip out any noise around gulp and using it's source streams for multiple packages if that helps... I just ripped it out of my current project.
from karma-browserify.
I'll take the lead on digging in on this since it's OS X-specific. I also just got in touch with Travis about getting included on the multi-OS beta. Might be hard to impossible to get a reliable failing test against this but I'd like to try anyway.
from karma-browserify.
@telegraphinho what you referenced in #75 (comment) is unrelated. I just closed thlorenz/proxyquireify#21 last night. That was actually a proxyquireify bug.
Will work on @webfella's repro now.
from karma-browserify.
Hmm. So what's actually going on here is that no files are getting included in the bundle when it's rebuilt after a change to a source file. Investigating...
from karma-browserify.
@bendrucker Yeah I couldn't track it down apart from removing the part that deletes missing files, which obviously isn't ideal.
from karma-browserify.
Thanks a lot guys, I just verified the patch works for my use case. Looking forward to seein it on npm.
Cheers
from karma-browserify.
Just released the fixes with [email protected].
from karma-browserify.
Thanks for the heads up @nikku
from karma-browserify.
I have a question regarding autoWatch, that I thought I'd ask here instead of starting a new issue.
Is there a way through the library to only run the tests affected by the change, ie a change to the "foo" module only triggers the "foo" tests instead of the entire suite? I havn't found a way to do it yet with browserify.
from karma-browserify.
This is something that would be a feature of karma-browserify rather than browserify. It is not implemented though and not the way karma works, too.
You can yield a similar behavior yourself though: If you are using mocha, specify it.only(...)
to run a focused test. Use iit(...)
in jasmine.
from karma-browserify.
Thanks for clearing that up mate, much appreciated.
from karma-browserify.
I'm having this issue now with the latest release. Oddly, I'm the only developer in a team of 6 experiencing this issue.
When I run the following command: $ grunt unit (Task: clean:reports install_custom_coverage karma:unit), I receive the following result:
...
DEBUG [web-server]: serving: C:\Dev\life-web_components\node_modules\karma\static/context.html
PhantomJS 1.9.8 (Windows 7) ERROR
TEST RUN WAS CANCELLED because this file contains some errors:
C:/cygwin/tmp/2cfb2e9479b44a59f6d3c57d366bd5b4.browserify
IE 8.0.0 (Windows 7) ERROR
TEST RUN WAS CANCELLED because this file contains some errors:
C:/cygwin/tmp/2cfb2e9479b44a59f6d3c57d366bd5b4.browserify
Chrome 41.0.2272 (Windows 7) ERROR
TEST RUN WAS CANCELLED because this file contains some errors:
C:/cygwin/tmp/2cfb2e9479b44a59f6d3c57d366bd5b4.browserify
DEBUG [karma]: Run complete, exiting.
DEBUG [launcher]: Disconnecting all browsers
DEBUG [framework.browserify]: cleaning up
DEBUG [launcher]: Process PhantomJS exited with code 0
DEBUG [temp-dir]: Cleaning temp dir C:\cygwin\tmp\karma-34162292
DEBUG [launcher]: Process Chrome exited with code 0
DEBUG [temp-dir]: Cleaning temp dir C:\cygwin\tmp\karma-61774528
DEBUG [reporter.junit]: JUnit results written to "C:/Dev/life-web_components/reports/unit_tests.xml".
DEBUG [launcher]: Killed extra IE process 6528
DEBUG [launcher]: Process IE exited with code 0
DEBUG [temp-dir]: Cleaning temp dir C:\cygwin\tmp\karma-94332604
Warning: Task "karma:unit" failed. Use --force to continue.
Aborted due to warnings.
I've tried a range of suggestions, restarting CMDER, restarting machine, deleting node_modules, reinstalling global node modules, set autoWatch to false and various other attempts with no luck.
As I'm the only developer in the team experiencing the issue, it appears to be environment related.
from karma-browserify.
Please ignore previous post, it turned out to be a component in our repo that required npm install
within the directory to install it's dependencies.
from karma-browserify.
Related Issues (20)
- intellij karma runner doesn't use watchify for bundle rebuild HOT 3
- Cannot read property 'bundleFile' of undefined HOT 2
- Error: Cannot find module HOT 2
- Use global transforms HOT 4
- ERROR [framework.browserify]: Error: Cannot find module HOT 2
- attempting to use node-underscorify with karma-browserify fails HOT 2
- Missing repo nikku/node-browserify breaks older versions (<4.0) HOT 1
- Karma not working with Firefox(FirefoxHeadless) when loading with html page. HOT 1
- Unable to browserify file HOT 1
- Install issues due to browserify peerDependecy condition HOT 1
- karma-browserify HOT 1
- lodash vulnerability reported by "npm audit" HOT 1
- When packaged, my test coverage is always 100% HOT 4
- release with PhantomJS removed? HOT 1
- promisify is not a function HOT 2
- Using karma-browserify with WASM HOT 2
- Cannot use import statement outside a module only on karma-browserify HOT 3
- Support for Browserify v17 HOT 2
- Breaking change coming for karma-browserify/lib/preprocessor.js HOT 4
- Support watchify <= 4 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from karma-browserify.