Range Splitter code error

//included libaries 

#include <Joystick.h>


//define input pins

#define SPLIT 1
#define RANGE 2
#define ENG_BRAKE 3


//joystick(joystick HID ID, Justick type, Button count, Hat switch count, Include X, Include Y, Include Z
//include Rx, Include Ry, include Rz, Include Throttle, Include Accelorator, Include Break, Include Steering

 Joystick_ Joystick(0X3, JOYSTICK_TYPE_JOYSTICK, 3, 0, false, false, true, false, false, false, false, true, false, false, false);

 const bool initAutoSendState = true;

 int lastButtonSPLITState = 0;
 int lastButtonRANGEState = 0;
 int lastButtonENG_BRAKEState = 0;


void setup() {
  // put your setup code here, to run once:
  pinMode(SPLIT, INPUT_PULLUP);
  pinMode(RANGE, INPUT_PULLUP);
  pinMode(ENG_BRAKE, INPUT_PULLUP);
  
  Joystick.begin();
  
}

void loop() {
  int currentButtonSPLITState = !digitalRead(SPLIT);
  if (currentButtonSPLITState != lastButtonSPLITState) {
    Joystick.setButton (6, currentButtonSPLITState);
    lastButtonSPLITState = currentButtonSPLITState;
}
int currentButtonRANGEState = !digitalRead(RANGE);
  if (currentButtonRANGEState != lastButtonRANGEState) {
    Joystick.setButton (7, currentButtonRANGEState);
    lastButtonRANGEState = currentButtonRANGEState;
}
int currentButtonENG_BRAKEState = !digitalRead(ENG_BRAKE);
  if (currentButtonENG_BRAKEState != lastButtonENG_BRAKEState) {
    Joystick.setButton (8, currentButtonENG_BRAKEState);
    lastButtonENG_BRAKEState = currentButtonENG_BRAKEState;
}

//pole delay/debounce
delay(10);
}

In file included from C:\Users\morga\OneDrive\Documents\Arduino\Shifter_and_pedals\Shifter_and_pedals.ino:2:0:
C:\Users\morga\OneDrive\Documents\Arduino\libraries\ArduinoJoystickLibrary-version-2.0\src/Joystick.h:24:10: fatal error: DynamicHID/DynamicHID.h: No such file or directory
 #include "DynamicHID/DynamicHID.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1

Compilation error: exit status 1

I am not sure what I did wrong with this as I have changed nothing in the code since the last time that I used it.

Which Arduino board have you got selected in the IDE ?

I have Arduino Micro selected.

Since the error message gave you a path and file name, did you think to look in that path and see if the file was actually still there?

Yes the file is there still.

Works fine for me with Arduino Joystick Library installed and Sparkfun:avr:promicro selected as the board type.

arduino-cli compile -b SparkFun:avr:promicro:cpu=16MHzatmega32U4 --warnings all --output-dir ~/tmp --no-color (in directory: /home/me/Documents/sketchbook/Pro_Micro/test)
Sketch uses 7746 bytes (27%) of program storage space. Maximum is 28672 bytes.
Global variables use 282 bytes (11%) of dynamic memory, leaving 2278 bytes for local variables. Maximum is 2560 bytes.
Used library Version Path
Joystick     2.0.5   /home/me/Documents/sketchbook/libraries/Joystick
Used platform Version Path
SparkFun:avr  1.1.13  /home/me/.arduino15/packages/SparkFun/hardware/avr/1.1.13
arduino:avr   1.8.3   /home/me/.arduino15/packages/arduino/hardware/avr/1.8.3
Compilation finished successfully.