angular - error with interpretation of CSS resources in Django REST + Angular2 -


i'm try deploy app on pythonanywhere , stuck problem. i'm have error:

resource interpreted stylesheet transferred mime type text/html

i don't know why it's happening. in localhost working fine.

full stack trace:

resource interpreted stylesheet transferred mime type text/html: "http://rodion.pythonanywhere.com/static/node_modules/bootstrap/dist/css/bootstrap.min.css". rodion.pythonanywhere.com/:12 resource interpreted stylesheet transferred mime type text/html: "http://rodion.pythonanywhere.com/static/bower_components/alertify.js/themes/alertify.core.css". rodion.pythonanywhere.com/:13 resource interpreted stylesheet transferred mime type text/html: "http://rodion.pythonanywhere.com/static/bower_components/alertify.js/themes/alertify.bootstrap.css". rodion.pythonanywhere.com/:14 resource interpreted stylesheet transferred mime type text/html: "http://rodion.pythonanywhere.com/static/styles.css". rodion.pythonanywhere.com/:24 resource interpreted stylesheet transferred mime type text/html: "http://rodion.pythonanywhere.com/static/libs/fancybox/source/jquery.fancybox.css". rodion.pythonanywhere.com/:28 resource interpreted stylesheet transferred mime type text/html: "http://rodion.pythonanywhere.com/static/libs/fancybox/source/helpers/jquery.fancybox-buttons.css". rodion.pythonanywhere.com/:32 resource interpreted stylesheet transferred mime type text/html: "http://rodion.pythonanywhere.com/static/libs/fancybox/source/helpers/jquery.fancybox-thumbs.css". rodion.pythonanywhere.com/:11 resource interpreted stylesheet transferred mime type text/html: "http://rodion.pythonanywhere.com/static/bower_components/font-awesome/css/font-awesome.min.css". jquery.min.js:1 uncaught syntaxerror: unexpected token < jquery.mousewheel-3.0.6.pack.js:1 uncaught syntaxerror: unexpected token < jquery.fancybox.pack.js:1 uncaught syntaxerror: unexpected token < jquery.fancybox-buttons.js:1 uncaught syntaxerror: unexpected token < jquery.fancybox-media.js:1 uncaught syntaxerror: unexpected token < jquery.fancybox-thumbs.js:1 uncaught syntaxerror: unexpected token < bootstrap.min.js:1 uncaught syntaxerror: unexpected token < alertify.min.js:1 uncaught syntaxerror: unexpected token < shim.min.js:1 uncaught syntaxerror: unexpected token < zone.js:1 uncaught syntaxerror: unexpected token < reflect.js:1 uncaught syntaxerror: unexpected token < system.src.js:1 uncaught syntaxerror: unexpected token < systemjs.config.js:1 uncaught syntaxerror: unexpected token < (index):51 uncaught referenceerror: system not defined(…)(anonymous function) @ (index):51

index.html:

<html>   <head>     <base href="/"/>     <title>photohub</title>     <meta charset="utf-8">     <meta name="viewport" content="width=device-width, initial-scale=1">     {% load staticfiles %}       <link rel="stylesheet" href="{% static "node_modules/bootstrap/dist/css/bootstrap.min.css" %}">     <link rel="stylesheet" href="{% static "bower_components/font-awesome/css/font-awesome.min.css" %}"/>     <link rel="stylesheet" href="{% static "bower_components/alertify.js/themes/alertify.core.css" %}"/>     <link rel="stylesheet" href="{% static "bower_components/alertify.js/themes/alertify.bootstrap.css" %}"/>     <link rel="stylesheet" href="{% static "styles.css" %}">      <!--final attempt fancybox-->     <!-- add jquery library -->     <!--<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>-->     <script src="{% static "bower_components/jquery/dist/jquery.min.js" %}"></script>     <!-- add mousewheel plugin (this optional) -->     <script type="text/javascript" src="{% static "libs/fancybox/lib/jquery.mousewheel-3.0.6.pack.js" %}"></script>      <!-- add fancybox -->     <link rel="stylesheet" href="{% static "libs/fancybox/source/jquery.fancybox.css" %}" type="text/css" media="screen"/>     <script type="text/javascript" src="{% static "libs/fancybox/source/jquery.fancybox.pack.js" %}"></script>      <!-- optionally add helpers - button, thumbnail and/or media -->     <link rel="stylesheet" href="{% static "libs/fancybox/source/helpers/jquery.fancybox-buttons.css" %}" type="text/css" media="screen" />     <script type="text/javascript" src="{% static "libs/fancybox/source/helpers/jquery.fancybox-buttons.js" %}"></script>     <script type="text/javascript" src="{% static "libs/fancybox/source/helpers/jquery.fancybox-media.js" %}"></script>      <link rel="stylesheet" href="{% static "libs/fancybox/source/helpers/jquery.fancybox-thumbs.css" %}" type="text/css" media="screen" />     <script type="text/javascript" src="{% static "libs/fancybox/source/helpers/jquery.fancybox-thumbs.js" %}"></script>     <!--final attempt fancybox-->       <!--<script src="{% static "bower_components/jquery/dist/jquery.min.js" %}"></script>-->     <script src="{% static "node_modules/bootstrap/dist/js/bootstrap.min.js" %}"></script>     <script src="{% static "bower_components/alertify.js/lib/alertify.min.js" %}"></script>       <!-- 1. load libraries -->      <!-- polyfill(s) older browsers -->     <script src="{% static "node_modules/core-js/client/shim.min.js" %}"></script>     <script src="{% static "node_modules/zone.js/dist/zone.js" %}"></script>     <script src="{% static "node_modules/reflect-metadata/reflect.js" %}"></script>     <script src="{% static "node_modules/systemjs/dist/system.src.js" %}"></script>     <!-- 2. configure systemjs -->     <script src="{% static "systemjs.config.js" %}"></script>     <script>       system.import('app').catch(function(err){ console.error(err); });     </script>   </head>   <!-- 3. display application -->   <body>     <photohub></photohub>   </body> </html> 

pythonanywhere dev here: when go of urls, content served looks html rather css. looking @ web app setup, appears haven't set static files table -- you've defined /static url, haven't put directory on same line files under /static should served from.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -