Failed to use swagger in docker
zingdle opened this issue · 2 comments
zingdle commented
Describe the bug
Failed to use swagger in docker
To Reproduce
- Follow: https://github.com/uber/aresdb/blob/master/docker/README.md
- Visit http://my-ip:9374/swagger/ (
my-ip
is the docker host's ip)
Chrome console output:
Refused to apply style from 'http://my-ip:9374/node_modules/swagger-ui-dist/swagger-ui.css' because its MIME type ('text/plain') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
(index):14 GET http://my-ip:9374/node_modules/swagger-ui-dist/swagger-ui-bundle.js net::ERR_ABORTED 404 (Not Found)
(index):15 GET http://my-ip:9374/node_modules/swagger-ui-dist/swagger-ui-standalone-preset.js net::ERR_ABORTED 404 (Not Found)
ceciliacsilva commented
I was having the same problem, I fixed installing the necessary js packages.
# cd api/ui
# npm install
zingdle commented
Thanks @ceciliacsilva ! It works like a charm.
In Dockerfile L34 it has done a npm-install. Don't know why we have to do it manually.