lundi 19 mars 2018

Why is jest throwing `Error: "toString()" failed`

When I try to run my jest test suite in my react app, it spits out this error:

Error: "toString()" failed
    at stringSlice (buffer.js:558:43)
    at Buffer.toString (buffer.js:631:10)
    at Object.fs.readFileSync (fs.js:601:41)
    at Object.<anonymous> (/home/andrew/Documents/wise-fox/The-App/node_modules/jest-haste-map/build/worker.js:38:65)
    at Generator.next (<anonymous>)
    at step (/home/andrew/Documents/wise-fox/The-App/node_modules/jest-haste-map/build/worker.js:64:1189)
    at /home/andrew/Documents/wise-fox/The-App/node_modules/jest-haste-map/build/worker.js:64:1419
    at new Promise (<anonymous>)
    at Object.<anonymous> (/home/andrew/Documents/wise-fox/The-App/node_modules/jest-haste-map/build/worker.js:64:1100)
    at Object.worker (/home/andrew/Documents/wise-fox/The-App/node_modules/jest-haste-map/build/worker.js:64:46)

I even checked out to a handful of previous git snapshots, and the same error still occurs even though it didn't spit out this error before.

This error is not very helpful, and I'm not sure where the problem could lie. Any help in just knowing what to try next would be greatly appreciated.

React 16 Linux Elementary OS

Aucun commentaire:

Enregistrer un commentaire