Adds middleware to your express app to serve the Swagger UI bound to your Swagger document. This acts as living documentation for your API hosted from within your app.
MIT License
1.41k
stars
225
forks
source link
Vercel: Unexpected token < in JSON at position 1 #293
When I run local environment is work. It has correctly loaded css style.
But running at Vercel Production, It's doesn't work.
Dev Tools show error
DevTools failed to load source map: Could not parse content for https://metawall-backend-git-feature-express-ayugioh2003.vercel.app/apidoc/swagger-ui-bundle.js.map: Unexpected token < in JSON at position 1
DevTools failed to load source map: Could not parse content for https://metawall-backend-git-feature-express-ayugioh2003.vercel.app/apidoc/swagger-ui-standalone-preset.js.map: Unexpected token < in JSON at position 1
I don't understand why this error occurs, cannot load css style, I'm not sure how to fix this.
I think it is vercel problem, same code deploy to Heroku, it's work!
Is there any idea?
Hi, I'm using vercel to deploy swagger api document
This is my full code.
Problem
When I run local environment is work. It has correctly loaded css style.![CleanShot 2022-05-02 at 16 05 11](https://user-images.githubusercontent.com/24752360/166203597-d6decb75-60ff-4871-a85e-22139bbc1fe2.png)
But running at
Vercel Production
, It's doesn't work. Dev Tools show errorI don't understand why this error occurs, cannot load css style, I'm not sure how to fix this. I think it is vercel problem, same code deploy to Heroku, it's work! Is there any idea?