#Weird useMachine error during nextjs application build
1 messages · Page 1 of 1 (latest)
What version of XState/XState React is this?
"xstate": "^4.38.2" and "@xstate/react": "^3.2.2".
That is strange, it should only require 1
Before I started to use typegen schema it was working fine
I added this recently and it stopped working since then
predictableActionArguments: true,
preserveActionOrder: true,
tsTypes: {} as import('./machine.typegen').Typegen0,
schema: {
context: {} as Context,
events: {} as Events,
services: {} as Services,
},
Oh, it might be because you are missing implementations
Yes but in the documentation it is written to add typegens to gitignore 🤔
w8 implementation of what ?
Does your machine have invoked services?
not yet it is just a draf I can send you its content if you wish
this is machine that causes problems
So it seems that it is required to push these *.typegen.ts files in my case. Otherwise it is not working🤦♂️ And it is throwing that weird error which does not make sense since it is enough to pass only the machine to that useMachine hook🤔
cc. @brisk sequoia