If your FAPI5 library file is stored in the server/lib folder, it should be available on every file within the server folder. (and ONLY this folder)
Then again, if you put calls to your FAPI5 library in other subfolders of server/lib, say server/lib/abc, or if your files are in the same server/lib folder but with a name that comes earlier in the alphabet than the fapi file like abc.js for example, your library won't be loaded yet. See this answer.
Also, in your examples, calls are made using FAPI method calls (FAPI.init() for example), not FAPI5. Shouldn't you use FAPI instead?