#Weird useMachine error during nextjs application build

1 messages · Page 1 of 1 (latest)

ivory hollow
#

Can anyone know what might be the reason of this error?

fresh shell
#

What version of XState/XState React is this?

ivory hollow
#

"xstate": "^4.38.2" and "@xstate/react": "^3.2.2".

fresh shell
#

That is strange, it should only require 1

ivory hollow
#

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,
},

fresh shell
#

Oh, it might be because you are missing implementations

ivory hollow
#

Yes but in the documentation it is written to add typegens to gitignore 🤔

#

w8 implementation of what ?

fresh shell
#

Does your machine have invoked services?

ivory hollow
#

not yet it is just a draf I can send you its content if you wish

ivory hollow
#

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🤔

fresh shell
#

cc. @brisk sequoia