Can't upload to nano every

so when i try to upload code to my nano every it sits for 5 minutes on uploading then i get this error timeout/error communicating with programmer (status -1)
avrdude: initialization failed, rc=-1
i tried looking for fixes but it seems that there is no fix. Any help would be appreciated.

I might be on the wrong track (and have no experience with the Nano Every), but did you select the Nano Every (not the classic Nano) from the tools/boards menu?

Is this the first time that you tried the board or did it work in the past?

Thanks for the answer. I did select nano every with the megaavr boards and it was working a few days ago but then suddenly i can't upload code

What does your operating system (which one) think about the board?

The loopback test is expected to fail on the Nano Every. The reason is that, unlike the classic Arduino boards like Uno, Nano, Mega, the connection to the computer is done via a dedicated serial port on the microcontroller and the port connected to pins 0 and 1 is a separate one (Serial1). The loopback test relies on pins 0 and 1 being connected directly to the USB adapter chip on the board.

Oh ok