Travis/Jest: TypeError: Cannot assign to read only property 'Symbol(Symbol.toStringTag)' of object '#<process>'

All my jest typescript tests fail in my travis pipeline throwing the following error:

TypeError: Cannot assign to read only property 'Symbol(Symbol.toStringTag)' of object '#<process>'

This happened suddenly without me changing anything particular in the code. And locally everything works fine.

Any ideas what could be happening ?


That is a bug that came with node v11.11. You can downgrade to v11.10 or wait for the fix which facebook has already pushed (jest error in Node version over 11.11).

If your problem is TravisCI related then you can set a fixed version which works:

node_js:
  - "11.10.1"

You can also upgrade your version of jest to 24.3.0 which has this issue fixed. I believe this is a more future proof solution than downgrading your node.