There are several matters here that are implied in this question.
1.. Occurrence of "Holy Spirit"
"Holy Spirit" occurs 90 times in the NT (most often in Acts) but is absent from:
- Galatians. However, we do have "Spirit of His Son" in Gal 4:6 and an extended passage about "The Spirit" in Gal 5:16-26
- Philippians. However, we do have "The Spirit of Jesus Christ" in Phil 1:19; and "Spirit of God" in Phil 3:3.
- Colossians. However, there is a debatable occurrence in Col 1:7.
- 2 Thessalonians. However, we do have a reference in 2 Thess 2:13 to "sanctification of [the] Spirit"
- Philemon.
- James. However, we have a debatable reference to Spirit in James 4:5 (to be addressed below)
- 1 John. However, we do have several references to "The Spirit" in 1 John 3:24, 4:13 and "The Spirit of God" in 1 John 4:2 and "The Spirit of Truth" in 1 John 4:6.
- 2 John.
- 3 John.
- Revelation. However, we do have "The Spirit(s) of God" in Rev 3:1, 4:5, 5:6; "The Spirit of life from God" in Rev 11:11.
Thus, the lack of "Holy Spirit" in James is not unique.
2.. What is "Scripture" in the NT?
The frequent reference to "scripture" (literally, "writings") in the NT almost always refer to what we now call the Hebrew scriptures or the OT. The one conspicuous exception is in 2 Peter 3:16 concerning the writings of the Apostle Paul:
as also in all the letters, speaking in them concerning these things,
among which some things are difficult to be understood, which the
ignorant and unestablished distort to their own destruction, as also
the other Scriptures
Thus, Peter appears to already regard (at least some of) Paul's writings as "Scripture" in his day. 1 Clement 23:3 appears to refer to a passage 2 Peter 3 as "Scripture". 1 Clement 45:2 appears to allude to John 5:39 and possibly Acts 17:11.
3.. Does James 4:5 reference the Holy Spirit?
I will argue that James 4:5 is a reference to the Holy Spirit. Now, it must be admitted that this verse is tricky - but let us notice three things about what this verse says:
- it quotes or alludes a Scripture passage(s)
- it talks about the Spirit that that God made to dwell in us
- it contrasts the work of this "spirit" with that of the world in V4
The only places in all the Bible that talks about the Spirit dwelling in us are all found in the NT in places like Rom 8:11, 1 Cor 3:16, Eph 2:22, 2 Tim 2;14, etc. See also John 14:17, 1 John 3:24, 4:13.
The big "problem" here is how to understand the word φθόνος (phthonos) and translated "envy" (or similar) every time it occurs, Matt 27:18, Mark 15:10, Rom 1:29, Gal 5:21, Phil 1;15, 1 Tim 6:4, Titus 3;3, James 4:5, 1 Peter 21. The basic meaning is "jealously". However, this does not need to be a negative emotion - because God is described as a "jealous God" in Ex 20:5, 34:14, Deut 4:24, 6:15, Nah 1:2, 2 Cor 11:2, etc.
Thus, I would translate James 4:5 something similar to the NASB:
Or do you think that the Scripture says to no purpose, “He jealously
desires the Spirit whom He has made to dwell in us”?
This is completely consistent with the rest of Scripture and the function of the Holy Spirit.