Skip to content
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

Can't import Sinon #21

Open
eguneys opened this issue Jul 31, 2015 · 1 comment
Open

Can't import Sinon #21

eguneys opened this issue Jul 31, 2015 · 1 comment

Comments

@eguneys
Copy link

eguneys commented Jul 31, 2015

When I add this line to my tests:

import Sinon from 'sinon';

I get a bunch of warnings and finally an error:

// ...
WARNING in ./~/sinon/lib/sinon/util/event.js
Critical dependencies:
107:25-32 require function is used in a way in which dependencies cannot be statically extracted
 @ ./~/sinon/lib/sinon/util/event.js 107:25-32

WARNING in ./~/sinon/lib/sinon/util/fake_xdomain_request.js
Critical dependencies:
219:25-32 require function is used in a way in which dependencies cannot be statically extracted
 @ ./~/sinon/lib/sinon/util/fake_xdomain_request.js 219:25-32

WARNING in ./~/sinon/lib/sinon/util/core.js
Critical dependencies:
382:25-32 require function is used in a way in which dependencies cannot be statically extracted
 @ ./~/sinon/lib/sinon/util/core.js 382:25-32

WARNING in ./~/sinon/lib/sinon/util/fake_xml_http_request.js
Critical dependencies:
627:25-32 require function is used in a way in which dependencies cannot be statically extracted
 @ ./~/sinon/lib/sinon/util/fake_xml_http_request.js 627:25-32

WARNING in ./~/sinon/lib/sinon/util/fake_timers.js
Critical dependencies:
73:25-32 require function is used in a way in which dependencies cannot be statically extracted
 @ ./~/sinon/lib/sinon/util/fake_timers.js 73:25-32
PhantomJS 1.9.8 (Linux 0.0.0) ERROR
  TypeError: 'undefined' is not an object (evaluating 'modules[moduleId].call')
  at /home/ubuntu/webdev/learn/yuzbir-react/app/app.tests.js:20:0 <- webpack:/webpack/bootstrap 6f2205015bef446b3e59:19:0

@ikornienko
Copy link

I have the same problem when I try to import sinon in my project. Seems like sinon's bug. @eguneys have you found any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants