react-notifications icon indicating copy to clipboard operation
react-notifications copied to clipboard

Notifications images not loading

Open kapoorruchi opened this issue 6 years ago • 4 comments
trafficstars

The notifications in my application do not show images of ' tick-mark' on success or 'cross-mark' for error. On the console I can see below errors - Failed to decode downloaded font: http://localhost:9001/dist/1beffae295b55aaec324a37cbd4a9538.woff :9001/detail/111250001:1 Failed to decode downloaded font: http://localhost:9001/dist/1beffae295b55aaec324a37cbd4a9538.woff :9001/detail/111250001:1 Failed to decode downloaded font: http://localhost:9001/dist/1beffae295b55aaec324a37cbd4a9538.woff :9001/detail/111250001:1 Failed to decode downloaded font: http://localhost:9001/dist/ce1579642e5e4a411673f1f3b30084bb.ttf :9001/detail/111250001:1 Failed to decode downloaded font: http://localhost:9001/dist/ce1579642e5e4a411673f1f3b30084bb.ttf :9001/detail/111250001:1 Failed to decode downloaded font: http://localhost:9001/dist/ce1579642e5e4a411673f1f3b30084bb.ttf

OTS parsing error: invalid version tag :9001/detail/111250001:1 OTS parsing error: invalid version tag :9001/detail/111250001:1 OTS parsing error: invalid version tag :9001/detail/111250001:1 OTS parsing error: invalid version tag :9001/detail/111250001:1 OTS parsing error: invalid version tag :9001/detail/111250001:1 OTS parsing error: invalid version tag :9001/detail/111250001:1 OTS parsing error: invalid version tag

These are setup in styles.main.css automatically and when loaded from css it is loading, so it does not seems to be a path issue. Also checked in networks tab, these are giving 304 Not modified response code.

Could not find the reason for the issue. My production release is this week and there are these issues. Please help.

kapoorruchi avatar Apr 01 '19 07:04 kapoorruchi

I have the same problem! Have you found any solution??

fabioetec avatar Apr 27 '19 08:04 fabioetec

This isn't a bug, but an incorrect configuration in your webpack. I hadn't been presenting text paths before, so I needed to add them to my modules. You need to make sure that the file-loader is outputing the files into the correct path, in my case that's /dist/fonts/[name].[ext], with the example below. Once I did that, everything started presenting correctly.

{ test: /\.(ttf|eot|svg|woff(2)?)(\S+)?$/, loader: 'file-loader?publicPath=/dist&name=/fonts/[name].[ext]' }

tjrexer avatar Jan 21 '20 20:01 tjrexer

I'm facing the same issue here, spent 3 hours already trying to solve without success. I already tried the config of @tjrexer but still not working, I have the same output path as yours and my config file is right now like this:

          test: /\.(ttf|eot|woff(2)?)(\S+)?$/,
          use: [
            {
              loader: 'file-loader',
              options: {
                name: '[name].[ext]',
                outputPath: 'dist/fonts',
                publicPath: 'dist/fonts'
              }
            }
          ]
        }

yuripramos avatar Jun 19 '20 22:06 yuripramos

I have a similar problem.

import "react-notifications/lib/notifications.css";

But the icon is not working like this. 스크린샷 2020-10-04 오후 10 01 17

On ReactJS, It worked fine. But on NextJS, it's not working.

Probably not a webpack problem. Because I am loading other fonts too. A separate error doesn't appear on the console, but it doesn't work.

Sh031224 avatar Oct 04 '20 13:10 Sh031224