Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Handlebars.compile is not a function #17

Open
sryze opened this issue Oct 19, 2020 · 1 comment
Open

TypeError: Handlebars.compile is not a function #17

sryze opened this issue Oct 19, 2020 · 1 comment

Comments

@sryze
Copy link

sryze commented Oct 19, 2020

After including twilio-flex-webchat.min.js:

twilio-flex-webchat.min.js:148 Failed to create webChat: TypeError: Handlebars.compile is not a function
    at twilio-flex-webchat.min.js:137
    at Array.forEach (<anonymous>)
    at v (twilio-flex-webchat.min.js:137)
    at Module.p (twilio-flex-webchat.min.js:142)
    at Function.value (twilio-flex-webchat.min.js:142)
    at e.value (twilio-flex-webchat.min.js:142)
    at new e (twilio-flex-webchat.min.js:142)
    at twilio-flex-webchat.min.js:142
    at v (twilio-flex-webchat.min.js:137)
    at Generator._invoke (twilio-flex-webchat.min.js:137)
(anonymous) @ twilio-flex-webchat.min.js:148

My project uses Handlebars as well, version 3.0.3, but I only include the runtime library because all templates are compiled ahead of time during a project build step.

<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/3.0.3/handlebars.runtime.min.js"></script>
<script src="my-templates.js"></script>

Looks like there is some sort of conflict. If flex-webchat-ui was open-source I could try to fix it myself but since it's not, I'm reporting the issue on this repo. Sorry, I don't know where else to send it.

@sryze
Copy link
Author

sryze commented Oct 19, 2020

Can this library be changed to encapsulate Handlebars inside and not rely on any external libs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant