FredrikOseberg / react-chatbot-kit

MIT License
297 stars 139 forks source link

typeerror t is not a constructor #97

Closed GuerreroDLaCruz closed 2 years ago

GuerreroDLaCruz commented 2 years ago

hey man i simply tried to used your chat bot, but it gives me this error prior its launch, seems the error is inside its modules/react-chat-bot/build/index

FredrikOseberg commented 2 years ago

Ok. Seems weird. Are you absolutely sure that your action provider and message parser are exported classes that you can instantiate?

SortedIvan commented 2 years ago

I am having the exact same issue and I don't know whats causing it. Everything is exported correctly and set-up as in your tutorial.

FredrikOseberg commented 2 years ago

Can you please provide a reproducable example?

søn. 19. des. 2021 kl. 02:15 skrev Ivan Ovcharov @.***>:

I am having the exact same issue and I don't know whats causing it. Everything is exported correctly and set-up as in your tutorial.

— Reply to this email directly, view it on GitHub https://github.com/FredrikOseberg/react-chatbot-kit/issues/97#issuecomment-997310470, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD2WIPSM3LB6UOAGPVHWWSTURUW3ZANCNFSM5KG3OX5Q . You are receiving this because you commented.Message ID: @.***>

Pinni05 commented 2 years ago

Hi I am getting the same error. Any solution?

FredrikOseberg commented 2 years ago

Hi I am getting the same error. Any solution?

https://codesandbox.io/s/sparkling-paper-0ewh7

Here is a working example. Apparently there is a mistake in the docs when it comes to the message parser, you need to export it. Add the line export default MessageParser at the bottom of the file.