-
Notifications
You must be signed in to change notification settings - Fork 9k
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
ReferenceError: Handlebars is not defined #1551
Comments
Hi, have you tried importing the modules in ES5 way? |
I get the same behavior -- note that I'm not importing the Handlebars module, this seems to be done in the swagger-ui.js file itself. |
Howdy, if you're looking to set up swagger-ui, you don't need to use express as an app server. I may be answering the wrong question, but the easiest way to do this is:
then you can open swagger-ui at |
Hi, similar issue here. I navigated to the node_modules/swagger-ui directory and ran npm install handlebars from there, but got the same error. THEN I entered node_modules/swagger-ui/dist/swagger-ui.js and added var Handlebars = require('handlebars'), and got the following error: Error: Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (>= 4.0.0) or downgrade your runtime to an older version (>= 2.0.0-beta.1). So that's confusing. Anybody else seeing this? |
@Chris0lsen can you please rm -rf the |
Any updates on this? I am facing the same issue. |
I have removed node_modules and tried it. I get the same error. |
I am having the same problem has anyone been able to solve this |
Same issue here. For now I'm just using the online docs generator: http://generator.swagger.io/ |
+1 I have no idea how to run this inside my express app - should be dead simple but getting same errors as your guys. |
Check out my way around it and note the version im on |
Anyone wants to give it a spin with 3.0? |
@webron yea ill give it a try in my meanstackjs |
This should no longer be an issue with 3.X. |
Trying to generate documentation for endpoint from my api-docs.json definition.
Am i missing something or setting up swagger ui incorrectly ?
Below is the exception
express controller below:
The text was updated successfully, but these errors were encountered: