0

I'm having this really weird error with my JavaScript code and Firebase. I will update my JavaScript code in my editor, Atom, save the .js file then go to the place where this file is located in the terminal and run firebase serve.

Most of the time this runs fine and my web page runs as intended and the code is the same when I use the 'inspect' function, however sometimes I will have an error which I go to fix, but after I update it in my editor, it will not be updated in the actual web page even after refreshing and re-running firebase serve.

I'll add a simple example just because I might not have explained it very well.

var percentage;

This is what I have saved in my editor.

var percentage:;

Uncaught SyntaxError: Unexpected token :

I had initially put the colon in by mistake, but even after I take it out this is what keeps coming up in my web page no matter how many times I refresh or re-run firebase serve.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Haris
  • 521
  • 1
  • 6
  • 14
  • 1
    The Firebase command line tools don't keep a persistent cache between runs. So the only way I can imagine this happening is when the browser is caching the file aggressively. If this happens again: try a different browser to ensure it's not a caching issue. – Frank van Puffelen Feb 07 '17 at 14:47
  • Yeah it turned out to be a caching issue. All I had to do to fix it was refresh my cache. Thanks for the help. – Haris Feb 08 '17 at 09:51
  • 1
    Good to hear Haris! – Frank van Puffelen Feb 08 '17 at 15:32

1 Answers1

0

It turned out to be a caching issue. All I had to do to fix it was refresh my cache.

Haris
  • 521
  • 1
  • 6
  • 14