Add a line below QBCore = nil for both main.lua files in server and client folders:

local QBCore = exports[‘qb-core’]:GetCoreObject()