Im using xstate inside one of our workflows, a few days ago they updated their repo to add a console.warn statement inside of the createMachine function.
This caused the workflow to start failing with the below error.
console.warn is not a function
TypeError: console.warn is not a function
at Module.createMachine (webpack-internal:///./node_modules/xstate/es/Machine.js:22:13)
at eval (webpack-internal:///./dist/apps/customer-interpreter-app/assets/lib/workflows/flow-renderer.js:31:36)
at step (webpack-internal:///./node_modules/tslib/tslib.es6.js:129:23)
at Object.eval (webpack-internal:///./node_modules/tslib/tslib.es6.js:110:53)
at fulfilled (webpack-internal:///./node_modules/tslib/tslib.es6.js:100:58)
I fixed this short term by just monkey patching console.warn
to console.log
.
What is the correct way to deal with something like this when running workflows in typescript.