- Notifications
You must be signed in to change notification settings - Fork2.1k
Uncaught ReferenceError: Handlebars is not defined#1990
-
Good afternoon :) |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 3 comments 6 replies
-
Can you provide a reduced test-case that reproduces the error? Otherwise it's hard for me to help you. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Thank you for your response, I will work with my team to implement a test case for this scenario and get the data back here. Please provide specifics if you need them. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Good day, I have attempted to implement a test case to share more data but I was unsuccessful as our application broke because of node version. Looked into the code again I found the source of the error "Uncaught ReferenceError: Handlebars is not defined" is originating from a file that looks like it is being generated at runtime templates.js this location is attempting to run a function This above mentioned function seems have a unique variation for each template we have in our code base, any modification to this file is removed after saving and our local build runs. More details about our application: |
BetaWas this translation helpful?Give feedback.
All reactions
-
In a Node environment, you should import Handlebars like this (and install it via npm): constHandlebars=require("handlebars"); The CDN min file is optimized for browsers. |
BetaWas this translation helpful?Give feedback.
All reactions
-
We import Handlebars into files using |
BetaWas this translation helpful?Give feedback.
All reactions
-
Are you making sure that the handlebars-cdn-script is loadedbefore the templates are executed? |
BetaWas this translation helpful?Give feedback.
All reactions
-
Yes we have a console output when our application is finished initializing and the Uncaught ReferenceError shows up in the console after that message. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Sorry, but I'm out of ideas. |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Also we are using Grunt versions: grunt-cli v1.4.3, grunt v1.5.3. I will include our configuration in our Grunt file for Handlebars. |
BetaWas this translation helpful?Give feedback.