-
-
Notifications
You must be signed in to change notification settings - Fork 701
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
TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them #464
Comments
I updated babel to 5.5.3 and it fixed the issue. |
Hey @moroshko thanks for the issue. I was just typing a reply and saw you closed it. Thanks! |
Hey, I'm experiencing this error now on babel versions 5.6.x. I just upgraded from 5.6.4 to 5.6.14 and it doesn't fix the issue. A reproducible case is [1].should.have.length(1)
expect([1]).to.have.length(1) I'll have a look at the source but I'm not sure I'll be able to fix this at first glance. |
I keep thinking I'm doing something wrong here, as even things like |
Even things like |
Sounds like that's probably not an issue with Chai. What errors are coming back? Can you compile the babel output and take a look at the source (or push it here). |
So just compiling with babel, it works, but when I bundle it up with webpack, it fails. There is no point posting the whole webpack bundle (8352 lines), but I might making chai et al. external and see if I can get a smaller webpack file |
Monkey patching the resulting bundle to look like this: https://gist.github.com/frederickfogerty/114d436f5184a1339bea works, but when I don't external chai, the resulting bundle gives me the error |
It looks like the same issue as #384 |
Yeah, the |
You might have some luck filing an issue with webpack - if it is setting a global |
It's babel causing the issue. This solves it https://babeljs.io/docs/advanced/transformers/other/strict/. |
Is there any chance of chai moving to strict mode? Is the stuff chai does even possible with strict mode? |
I don't think babel really causes the issue - because every file you pass into babel is "supposed" to run in its own context. I have no problem with browserify+babelify, because each file is wrapped in a As for Chai moving to strict mode - this is the one line stopping us from moving - but its reasonably important. We could look at ditching it and moving to strict mode - but I'm not entirely sure it is worth it, especially as its not really fixing the real issue here. |
I think my real mistake was forgetting to remove
I assume that line is for stack tracing? Using webpack I'm in the small minority who has no use for it (the stack traces don't work for webpack). It is definitely useful on my other projects where I'm not tied to webpack, though. Anyway thanks for your help in resolving this! |
Yeah, |
Please reopen this issue since it still stays on chai@3.4.1 |
Hey @Tresdin - as mentioned above, if you're using babel you shouldn't get it to convert your node modules. We don't currently support babel - however you're welcome to use it, but simply need to add `ignore: 'node_modules'`` to your config and things will work fine. |
@keithamus Sorry for the misunderstanding. I don't use babel. I actually got this error when I installed |
@Tresdin could you provide the install log which causes this error. |
@keithamus The error doesn't occur on installation stage. Just like others, after a successful installation, I got this error with something like
|
@Tresdin it looks like it might be worth filing a new issue with all of the relevant details, such as chai version, error logs, code to reproduce etc. |
@keithamus I've filed this related issue #578. Please let me know if you need any other information. |
chai 3.0.0 doesn't seem to be compatible with babel.
See: http://stackoverflow.com/q/30663989/247243
The text was updated successfully, but these errors were encountered: