Joshua 23:7

23:7 or associate with these nations that remain near you. You must not invoke or make solemn declarations by the names of their gods! You must not worship or bow down to them!

Joshua 24:2

24:2 Joshua told all the people, “Here is what the Lord God of Israel says: ‘In the distant past your ancestors lived beyond the Euphrates River, including Terah the father of Abraham and Nahor. They worshiped other gods,

Joshua 24:20

24:20 If you abandon the Lord and worship foreign gods, he will turn against you; he will bring disaster on you and destroy you, though he once treated you well.”