Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

TypeError xxx is not a function Might Be A Missing Semi-Colon

When you get something like this:

Code

TypeError: "output.jpg" is not a function

The problem might be a missing semi-colon at the end of the line defining a variable.

For example, this:

Code

const output_tmp_path = "output.jpg"

when you need this

Code

const output_tmp_path = "output.jpg";
  • Figure out which version of javascript requires the semi-colons and which one doesn't.