javascript - Rails asset pipeline compiled js error -


When I am in development mode, everything works and I have the following. Js import order:

   

And in production, this is like the following:

   

The problem is that I'm getting some eros in production mode that I can not understand. The first error is:

  UnkeyType error: There is no way 'countdown' in object [object object]  

call import for countdown The latter is Application.js, so why is this happening? Is it possible that inline script is being executed before application.js? If so, why does not this happen in development with different files?

The second error is:

  Uncort type error: can not call the method 'addEventListener'  

Update:

If I put a set interval I resolve the first error, such as:

   

So I think the inline script is being executed for the first time. it's so weird.

You are seeing this error before one due to: Uncaught TypeError: Method Can not call 'addEventListener' zero

This is in production because all JS is in one file and if there is an error then the rest is not executed. It works in development because 5modalEffects.js is a separate file, so the error in that file does not affect anyone else.

I have a more modal button inside .md-close class div # modal-1 and it solved other problems :)


Comments