Can't upload to Arduino nano every

Hi, I can’t upload my programs to arduino nano every while using platform io. I have tried using different ports, but nothing seems to work.
I’m losing my sanity here, and would appreciate any help, thank you.
This is what I get as an error: avrdude: jtagmkII_getsync(): sign-on command: status -1

Here is my PIO config file:
[env:nano_every]

platform = atmelmegaavr

board = nano_every

framework = arduino

upload_port = /dev/ttyACM2

Does it work in the Arduino IDE? If not, it may indicate a hardware fault.

Hi, yes, it doesn’t work in the arduino IDE either. I will try to change to a different board and see.