mosquito / pypi-server

Tornado based server like pypi.python.org. With caching from pypi.
MIT License
120 stars 38 forks source link

Javascript errors #16

Closed adepretis closed 6 years ago

adepretis commented 6 years ago

Started the Docker container as described in the documentation, tried :latest and :0.4.4 - for both it results in Javascript errors when accessing the browser UI:

screen shot 2017-11-06 at 15 04 41

adepretis commented 6 years ago

the missing jQuery dependency seems to be because of

https://github.com/mosquito/pypi-server/blob/58b98f9de372f29a006c4d61c016a830c1ceeed0/pypi_server/templates/index.html#L32-L33

bootstrap/* gets loaded before jquery (a-z sorting)

<script type="application/javascript" src="/static/vendor/bootstrap/js/bootstrap.js"></script>
<script type="application/javascript" src="/static/vendor/bootstrap/js/bootstrap.min.js"></script>
<script type="application/javascript" src="/static/vendor/jquery.min.js"></script>

Moving jquery.min.js to e.g. a-jquery.min.js resolves the first 2 errors. The error regarding data.map is not a function keeps coming up and the whole browser UI is not working correctly!

adepretis commented 6 years ago

Sorry, the Angular error is a result of traefik loadbalancer returning the 403 http error code generated by pypi-server as 200 to the browser. The jQuery loading issue still is an issue though.

Regarding traefik see: https://github.com/containous/traefik/issues/2365