I'm using IO.js 1.4.3 and Jest to run my test suites. I need a newer version of V8 because I am using ES6 features like Promises.
If I try the simplest possible test:
describe('the truth', function() {
it('is true', function() {
expect(true).toBeTruthy();
});
});
it works (thankfully). If I include, however, a call to require()
(which I have to do to test my own code), I get:
Using Jest CLI v0.4.0
Waiting on 1 test...Segmentation fault: 11
This happens irrespective of which module I include, and whether I make a call to jest.dontMock()
first.
This doesn't really tell me very much qua error message, and require
really does seem to be the problem. Are there any solutions to this other than reverting to pre-1.0 node.js?
This happens in cases where you have installed node_modules
using node
at some version, and then later switching to iojs
using nvm install iojs
and trying to run the installed node_modules
with npm
. It isn't likely that this is your issue, but hopefully anyone else googling around can try this and fix it.
nvm install iojs
rm -rf node_modules
npm install
then running whatever it is you're trying to run, usually something like npm run start
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With