Forum Discussion

SaumyaGpt's avatar
SaumyaGpt
New Contributor
12 months ago

swagger-editor gives Uncaught TypeError: SwaggerEditorBundle is not a function at window.onload

I am trying to use the swagger-editor repo https://github.com/swagger-api/swagger-editor in my local system(windows).When i run npm start command things are working fine but as soon as i make a minor chnage in the components like changing clear editor text to clear editor1 and trying to build the files again using npm run build it is giving the error Uncaught TypeError: SwaggerEditorBundle is not a function at window.onload when I am accessing it using localhost:3001. 

Even if I dont make any change and run the command npm run dev , same issue is occuring, can someone please help in figuring out the resolution for this and how we can do the same if we have to change something?

 

1 Reply

  • SaumyaGpt's avatar
    SaumyaGpt
    New Contributor

    Turns out that the bundle and preset file of the master branch of this repo are giving error. When we switched to the other branch 3.x it started working fine.