“.actions” not found in the new InputSystem

Hello everybody, I am currently working on a 3d endless runner game and I want to add a mode where two players can play with a split screen. To be able to control the players in the game, I must add the “.actions” method in the void Awake () of the player controller script. However Unity seems to have a problem with it and whenever I declare “.actions”, Unity says:
´ CS51061 error ”NewPlayerInput” does not contain a definition for “actions” , and no accessible actions extension method could be found that accepts a first argument of type “NewPlayerInput” (possibly a using directive or assembly reference is missing)´ .
As you can see, I already created a new player input since I thought that the old one might not include “.actions”, but that didn’t fix the problem.
I am currently using Unity 2021.3.30f1 and the 1.7.0 version of the Input System. Would updating my Unity or Input System version solve the problem? But I tried declaring “.actions” in a test project, which uses the same Unity and Input System version, and there it worked.
Anyways here is the player controller script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;

public class PlayerControllerNew : MonoBehaviour
{
    private InputActionAsset inputAsset;
    private InputActionMap move;


    private void Awake()
    {
        inputAsset = this.GetComponent<NewPlayerInput>().actions; //here is the problem and Unity says: "NewPlayerInput" does not contain a definition for "actions", and no accessible actions extension method could be found that accepts a first argument of type "NewPlayerInput" (possibly a using directive or assembly reference is missing)

        move = inputAsset.FindActionMap("Move");
    }
     private void OnEnable()
    {
        move.FindAction("Jump").performed += ctx => jumpInput = true;
        move.FindAction("Jump").canceled += ctx => jumpInput = false;

        move.FindAction("Left").performed += ctx => leftInput = true;
        move.FindAction("Left").canceled += ctx => leftInput = false;

        move.FindAction("Right").performed += ctx => rightInput = true;
        move.FindAction("Right").canceled += ctx => rightInput = false;

        move.FindAction("Down").performed += ctx => slideInput = true;
        move.FindAction("Down").canceled += ctx => slideInput = false;
        move.Enable();
    }

    private void OnDisable()
    {
        move.FindAction("Jump").performed -= OnJump;
        move.FindAction("Left").performed -= OnLeftKeyPressed;
        move.FindAction("Right").performed -= OnRightKeyPressed;
        move.FindAction("Down").performed -= OnSlide;
        move.Disable();

    }

and here is the script in the test project (which as I said works):
public class ImportedPlayerControllerScript : MonoBehaviour

{
    private InputActionAsset inputAsset;
    private InputActionMap move;

    void Awake()
    {
       inputAsset = this.GetComponent<PlayerInput>().actions;
       move = inputAsset.FindActionMap("Move");
    }

    private void OnEnable()
    {
        move.FindAction("Jump").performed += OnJump;
        move.FindAction("Left").performed += OnLeftKeyPressed;
        move.FindAction("Right").performed += OnRightKeyPressed;
        move.Enable();
    }

    private void OnDisable()
    {
        move.FindAction("Jump").performed -= OnJump;
        move.FindAction("Left").performed -= OnLeftKeyPressed;
        move.FindAction("Right").performed -= OnRightKeyPressed;
        move.Disable();}



Look around the member’s properties using your IDE’s suggestions.

If you’re using action maps, you’ll need to first access those (by name), and then their map via .Get()