The error is pointing to the @onready line, and says:
E 0:00:01:0034 _ready: Script class can only be set together with base class name
C++ Error Condition "script.is_valid() && p_class_name == StringName()" is true.
C++ Source core/variant/array.cpp:731 @ set_typed()
Stack Trace player_move.gd:11 @ _ready()
It seems to have popped up some time without my noticing, the game still runs correctly. (I’ve also tried restarting Godot a few times.)
Ran into the same issue in Godot v4.beta6. In my case it happened due to using constants from another script. For example:
A static helper script: MyHelpers.gd
const MY_CONSTANT := { TYPE_FLOAT: 0.0 }
Using constant in another script with error
const MyHelpers := preload("MyHelpers.gd")
var test := MyHelpers.MY_CONSTANT # Error.
Using constant in another script without error
const MyHelpers := preload("MyHelpers.gd")
const MY_CONSTANT = MyHelpers.MY_CONSTANT
var test := MY_CONSTANT # No problem.
Note that this didn’t happen with static methods. Only with constants.
Refactoring codes more ran into the issue again, but it was again solved similarly - transferring the constant refs:
const SomeClass := ManyClasses.SomeClass
Thoughts: This likely a tiny bug related to typing and preloading scripts/classes. Saving order might also disguise the issue temporarily in some cases. There are a lot of small typing related peculiarities that are currently being worked on in Godot v4.0 beta versions. So the issue might also disappear by updating to a newer version.