If you use ESX 1.8.5 and get the following error, then replace the following code in ESX.
SCRIPT ERROR: @es_extended/common/functions.lua:54: bad argument #1to'upper' (string expected, got table)
So if you get this error when adding a Weapon Component go to es_extended/server/classes/player.lua and search for function self.addWeaponComponent(weaponName, weaponComponent).