Monday, 2 July 2018

Failed to decode downloaded font, OTS prasing error on Angular 6 app deployed with nginx

I've deployed the angular dist folder with following structure on ngnix. But getting the Failed to decode downloaded font: host/rfid/fontawesome-webfont.af7ae505a9eed503f8b8.woff2?v=4.7.0; OTS parsing error: invalid version tag error.

Here's how I've included the font-awesome.

package.json

"dependencies": {
-------
"font-awesome": "^4.7.0",
--------
}

angular.json

"styles": [
-----,
"node_modules/font-awesome/scss/font-awesome.scss",
-----
]

Here's the path of where I'm deploying the dist folder.

/user/www/data/rfid/dist

Following is my nginx conf file default.conf.

proxy_cache_path /tmp/nginx levels=1:2 keys_zone=nginx_cache_zone:10m inactive=60m;
proxy_cache_key "$scheme$request_method$host$request_uri";

client_max_body_size 20M;
proxy_read_timeout 600;

server {
    listen 80 default_server;
    server_name something;
    location /rfid/ {
      alias /user/www/data/rfid/dist/;
      try_files $uri$args $uri$args/ /rfid/index.html;
   }
}

Let me also include what my build looks like.

Angular 6 app dist

What am I missing here? Thanks in advance.

Note: I've added the application/font-woff2 woff2; in ngnix mime types.



from Failed to decode downloaded font, OTS prasing error on Angular 6 app deployed with nginx

No comments:

Post a Comment