Exported game runs fine, but crashes when run through Windows cmd

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Derkune

In cmd, I typed the path to the game and received a long log. I think the bottommost error is caused by the one above it, and so on. At the very top, there are these errors:

ERROR: Condition "err" is true. Returned: err
 at: load_source_code (modules/gdscript/gdscript.cpp:775)
ERROR: Cannot load source code from file 'res://PackedCargo.gd'.
 at: (modules/gdscript/gdscript.cpp:2179)
ERROR: Failed loading resource: res://PackedCargo.gd. Make sure resources have been imported by opening the project in the editor at least once.
 at: (core/io/resource_loader.cpp:270)
SCRIPT ERROR: Parse Error: The class "PackedCargo" was found in global scope, but its script couldn't be loaded.
      at: GDScript::load_byte_code (res://Cargo.gdc:30)

Usually, PackedCargo.gd works fine, but not here. Here’s code of PackedCargo:

extends Reference
class_name PackedCargo

var content
var number = 0

func _ready():
    pass # Replace with function body.

What might be the issue?