"type: Phaser.AUTO," results in "Phaser is not defined" console error

I’m going through the Phaser 3 tutorial at Making your first Phaser 3 game - Phaser and I’m running into an issue: when setting up var config the console log is telling me “Phaser is not defined” and it breaks on the bolded line below (Phaser.AUTO):

 var config = {
     **type: Phaser.AUTO,**
     width: 800,
     height: 600,
     scene: {
         preload: preload,
         create: create,
         update: update
     }
 };

What’s interesting is that I put “console.log(“Phaser Loaded”);” into the top of phaser.js and it logs it correctly, so I’m not sure what the issue is…phaser.js is being loaded. My development environment is Visual Studio 2022 and the project is set up as an ASP.Net Core MVC web application.

Here’s the full page of Views/Home/Index.cshtml:

@{
    ViewData["Title"] = "Phaser Game";
}

<head>
    <meta charset="UTF-8" />
    <title>Phaser Test</title>
</head>


<script type="text/javascript">

    var config = {
        type: Phaser.AUTO,
        width: 800,
        height: 600,
        scene: {
            preload: preload,
            create: create,
            update: update
        }
    };

    var game = new Phaser.Game(config);

    function preload() {
    }

    function create() {
    }

    function update() {
    }

</script>

and my Views/Shared/_Layout.cshtml scripts loading:

<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="~/js/phaser.js"></script>
<script src="~/js/site.js" asp-append-version="true"></script>

Thank you!

Is phaser.js loaded first?

Whoops, that fixed it. Script loading priority is now:

<script src="~/js/preload.js"></script>
<script src="~/js/create.js"></script>
<script src="~/js/update.js"></script>
<script src="~/js/phaser.js"></script>
<script src="~/js/game.js"></script>
<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="~/js/site.js" asp-append-version="true"></script>

Thanks!