The resemblance between this verse and an exhortation in Deuteronomy should be noticed, Joshua 11:16-17, “Take heed to yourselves, lest... ye turn aside and serve other gods and worship them; and then the Lord’s wrath be kindled against you... and ye perish quickly from off the good land which the Lord giveth you.”
Related Commentaries of Joshua 23:16
Joshua 23:16
16 When ye have transgressed the covenant of the LORD your God, which he commanded you, and have gone and served other gods, and bowed yourselves to them; then shall the anger of the LORD be kindled against you, and ye shall perish quickly from off the good land which he hath given unto you.