2:1
My brethren, have not the faith of our Lord Jesus Christ, the Lord of glory, with respect of persons.
James 2 is not about having no faith without works. James 2 is about not having the faith of the Lord Jesus, without doing His good works.
The error of James 2 is not about claiming any faith, but rather is specifically about claiming to have the faith of the Lord Jesus.
The general Bible principle is that any faith without works, is dead. The doctrine of Christ is that any faith in God without good works, is dead to God.
2:19
Thou believest that there is one God; thou doest well: the devils also believe, and tremble.
Trying to say James 2 is only about having dead faith without any works, is an error and a diversion from the specific rebuke in James 2: Which is against having one's own faith in God, that is not the faith of the Lord Jesus Christ, because it has not the good works of Christ.
James e acknowledges some having faith in God, but their faith is their own alone, if it is without doing His good will. It's not the faith of Jesus. And therefore they are trusting in their own faith alone, apart from doing His good works, to save them.
2:14
What doth it profit, my brethren, though a man say he hath faith, and have not works? can faith save him?
Ps 12:3-4
The LORD shall cut off all flattering lips, and the tongue that speaketh proud things: Who have said, With our tongue will we prevail; our lips are our own: who is lord over us?
And so, the faith they do have in God cannot save their own soul, because it is not the saving faith of Jesus, that is always doing those works pleasing to the Father.
James 2 is specifically against having any salvation without works. It rebukes anyone naming the name of Christ, and claiming to be saved by one's own faith apart from Christ's works.
Any faith one has in God, that is apart from His good works, is apart from His Christ.
Therefore, anyone preaching any gospel of having salvation only by faith alone, apart from doing Christ's good works, is preaching one's own gospel alone, and claiming to be saved by having their own faith in God, apart from the saving faith of Jesus.
Anyone on earth having faith without works, has dead faith. Anyone having faith in God without doing His good works, has faith of his own alone and dead to God.
Eph 2:8
For by grace are ye saved through faith; and that not of yourselves: it is the gift of God:
The gift of God is the faith of Jesus to them that repent of sinning against God, to receive His Son and His saving faith always do the Father's good will.
Any faith in God apart from doing His works, is of oneself alone. It is not the gift of the God of Christ Jesus.