Learning FAIL

On your web page: Get Started with GoJS, I created index.html as`

GoJS Greetings
<script src="https://cdnjs.cloudflare.com/ajax/libs/gojs/1.6.15/go-debug.js"></script>
<script src="greetings.js"></script>

and greetings.js as var $ = go.GraphObject.make; var myDiagram = $(go.Diagram, "myDiagramDiv");

When it runs, it throws an: “Uncaught Error: Invalid DIV id; could not get element with id: myDiagramDiv”

This is not a good start. Please advise so I can follow your tutorial.

I’m guessing that you are executing the contents of “greetings.js” before the

exists later on in the file.

Try moving the elements to the end of your file, or execute your JavaScript when the BODY has loaded.