-
-
Notifications
You must be signed in to change notification settings - Fork 698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bundle error on Browserify #978
Comments
@laistomazz Thanks for the issue. Any chance you could create a small, standalone repo demonstrating the error? |
Here it is: I tested it on a MacOS right now and the error is the same. I hope it helps :) |
I'm seeing a similar error on my repo when trying to update to v4.0.0. build on circle-ci |
This seems to be the problem of "browser" field in package.json, imported by #875. Passing I personally disagree that this package should have browser field in package.json. It may cause problem like this and #981. |
Hi @laistomazz, thanks for your issue and thanks everyone for your help. I have just read the Apparently it's goal is to replace the entry-point for when bundling a module, but since The ones wanting to use Chai in the browser can still link to the |
I've reviewed the
I think the thing to do in the short-term is revert #875 and release 4.0.1 as bug fix release. In the long term, if the problem that led to #875 is still a problem, it may be possible to use the |
Sorry, this was down to me. Should have known better. Let's release a 4.0.1 without the offending field 😄 |
This removes the browser field which was used incorrectly. It is not needed for chai, and bundlers should bundle the commonjs code instead.
I was trying to use require Chai while using Mocha/Karma.
ERROR [framework.browserify]: bundle error
ERROR [framework.browserify]: Error: Cannot find module './chai/config' from 'C:\folder\node_modules\chai'
The error repeats until './chai/interface/expect'
I'm using Windows 7, it worked when I switched to version 3.5.0.
The text was updated successfully, but these errors were encountered: