This is a variation of the general question as to whether a target is required in different situations but as that is a broader question with a longer answer, I'll ask about this particular situation... If Harmonic Sliver comes into play and there are no enchantments or artifacts in play (on either side), Harmonic Sliver still stays in play, correct?
Yes. The ability Harmonic Sliver grants to itself will still trigger and go on the stack even if there are no enchantments or artifacts on the battlefield (C.R. 603.2, 603.3, 603.6a, 603.10); it's just that the ability is removed from the stack without resolving (and with no further consequences to Harmonic Sliver) if neither an enchantment nor an artifact can be targeted with that ability (C.R. 603.3d, 601.2c, 117.4).
Note that Harmonic Sliver itself doesn't target anything; with limited exceptions, no permanent spell can have targets (C.R. 115.1b, 115.1e).
EDIT (Nov. 24): Correctness edit.
EDIT (Feb. 1): Add rule citations.
EDIT (Apr. 17, 2020): Edited to conform to rule update with Ikoria: Lair of Behemoths.
Note that Harmonic Sliver itself doesn't target anything; with limited exceptions, no permanent spell can have targets (C.R. 115.1b, 115.1e).
EDIT (Nov. 24): Correctness edit.
EDIT (Feb. 1): Add rule citations.
EDIT (Apr. 17, 2020): Edited to conform to rule update with Ikoria: Lair of Behemoths.