A Possible Fix:
In my project there is only component (the TTrackbar which is used to vary values).
Perhaps delete the TTrackbar and then create another one (and put in the previous code).
I made my version using Lazarus Ver 2.2.4 32 bit compile , on Win 10 .
I once had a problem with some Lazarus code made on Linux and found if I replaced the components on the form then everything worked and compiled OK.
Also:
That error seems to suggest that you installed some component twice, and then deleted it.