It is not able to find the function in any of the loaded libraries. So theThe method is running before sp.js is loaded.Add Add ExecuteOrDelayUntilScriptLoaded method before calling your function.
ExecuteOrDelayUntilScriptLoaded(updateProjectEC(), "sp.js");
or
SP.SOD.executeFunc('sp.js', 'SP.ClientContext', updateProjectEC());