Avedude: stk500_getsync error

This error pops up when i plug in my xbee shield and XBEE module onto the arduino uno board

Arduino: 1.8.13 (Windows 10), Board: “Arduino Uno”

Sketch uses 924 bytes (2%) of program storage space. Maximum is 32256 bytes.

Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.

An error occurred while uploading the sketch

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x02

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x02

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x02

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x02

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x02

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x02

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x02

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x02

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x02

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x02

how do i go about rectifying this error? anyone in the know?

Pins 0 and 1 on the Uno are also used for communication with the computer over the USB cable, including uploads. So connecting anything to pins 0 and 1 can cause uploads to fail. There are some shields that use these pins. Usually they will have a switch where you can cut off the communication with the shield when uploading, then reconnect the communication with the shield after the upload.

Thanks for the feedback. The ardunio board works fine without the xbee shield and xbee module, as soon as i plug in the two with the switch on USB and try to upload a sketch it produce the error i post in my earlier post.

My understanding is the when the switch is on the usb . the DOUT of the xbee radio is connected to the RX of the serial to USB converter and its DIN to the TX of the serial to usb conventer.
In order to use the the xbee shield i must upload a empty sketch or remove the microprosessor.