It seems that after updating to 1.4.5 react-apollo/lib/test-utils has disappeared.
module.js:487
throw err;
^
Error: Cannot find module 'react-apollo/lib/test-utils'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/src/app/src/components/accounts/List/ListContainer.test.jsx:8:1)
at Module._compile (module.js:569:30)
at loader (/usr/src/app/node_modules/babel-register/lib/node.js:144:5)
at Object.require.extensions.(anonymous function) [as .jsx] (/usr/src/app/node_modules/babel-register/lib/node.js:154:7)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at /usr/src/app/node_modules/mocha/lib/mocha.js:230:27
at Array.forEach (native)
at Mocha.loadFiles (/usr/src/app/node_modules/mocha/lib/mocha.js:227:14)
at Mocha.run (/usr/src/app/node_modules/mocha/lib/mocha.js:495:10)
at Object.<anonymous> (/usr/src/app/node_modules/mocha/bin/_mocha:469:18)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Function.Module.runMain (module.js:605:10)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:575:3
This isn't an issue on 1.4.4.
This is happening for whatever the latest release for react-apollo is as of 7/4/2017. NPM and GitHub releases are giving different version numbers so it's a little confusing.
@anthonator test-utils can be found at react-Apollo/test-utils instead of at /lib/test-utils. I'll work on updating the releases today! Sorry about that!
This fixed the issue.
This is out of curiosity but for a change like this shouldn't the major or minor versions have been bumped? After updating a patch release all my test code broke which was unexpected.
@anthonator most likely yes, that is my fault. I though that test-utils was exported out of the root level prior but was mistaken. I'm sorry for any trouble this caused you!
It wasn't a huge problem. It was mostly just confusing. Thanks!
Most helpful comment
@anthonator
test-utilscan be found atreact-Apollo/test-utilsinstead of at/lib/test-utils. I'll work on updating the releases today! Sorry about that!