Error: Invalid incomplete type

Tell me what to do if it produces such an error. Sorry, the code from the book. Code:

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "MAXCLAS.generated.h"

/**
 * 
 */
UCLASS()
class MYPROJECT6_API UMAXCLAS : public UObject
{
	GENERATED_BODY()

		UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Unit) TSubclassOf<UObject> UClassOfPlayer; // Displays any UClasses
		// deriving from UObject in a dropdown menu in Blueprints
		// Displays string names of UCLASSes that derive from
		// the GameMode C++ base class
		UPROPERTY(EditAnywhere, meta = (MetaClass = "GameMode"), Category = Unit) FStringClassReference UClassGameMode;

};

is it an intellisense error or a build error ?

try adding include to
#include “CoreUObject.h”

Firefly74, good afternoon, this is a build error.

The project has gathered. There are no errors. Thank you very much!