When upgrade engine from v4.20 to v4.22, SkeletalMesh Cook failed.

Log Error:

UATHelper: Packaging (Windows (64-bit)):   LogCook: Display: Cooked packages 4338 Packages Remain 6916 Total 11254
UATHelper: Packaging (Windows (64-bit)):   LogNiagaraCompiler: Error: Skeletal Mesh DI Function GetTriPositionWS has been deprecated. Use GetSinnedTriangleData or GetSkinnedTriangleDataWS instead.
UATHelper: Packaging (Windows (64-bit)):    - Node: Get Tri Position WS - Callstack: UpdateScript.MyScript
UATHelper: Packaging (Windows (64-bit)):   LogNiagaraCompiler: Error: Incorect number of outputs. Can possibly be fixed with a graph refresh. - Node: Get Tri Position WS - Callstack: UpdateScript.MyScript
UATHelper: Packaging (Windows (64-bit)):   LogNiagaraCompiler: Error: Error compiling input on Lerp node. - Node: Lerp Pin: A - Callstack: UpdateScript.MyScript
PackagingResults: Error: Skeletal Mesh DI Function GetTriPositionWS has been deprecated. Use GetSinnedTriangleData or GetSkinnedTriangleDataWS instead.
PackagingResults: Error: Incorect number of outputs. Can possibly be fixed with a graph refresh. - Node: Get Tri Position WS - Callstack: UpdateScript.MyScript
PackagingResults: Error: Error compiling input on Lerp node. - Node: Lerp Pin: A - Callstack: UpdateScript.MyScript
UATHelper: Packaging (Windows (64-bit)):   LogNiagaraCompiler: Error: Skeletal Mesh DI Function GetTriPositionWS has been deprecated. Use GetSinnedTriangleData or GetSkinnedTriangleDataWS instead.
UATHelper: Packaging (Windows (64-bit)):    - Node: Get Tri Position WS - Callstack: UpdateScript.MyScript
UATHelper: Packaging (Windows (64-bit)):   LogNiagaraCompiler: Error: Incorect number of outputs. Can possibly be fixed with a graph refresh. - Node: Get Tri Position WS - Callstack: UpdateScript.MyScript
UATHelper: Packaging (Windows (64-bit)):   LogNiagaraCompiler: Error: Error compiling input for convert node. - Node: Break Vector Pin: Input 1 - Callstack: UpdateScript.MyScript
UATHelper: Packaging (Windows (64-bit)):   LogNiagaraCompiler: Error: The HLSL Translator failed to generate HLSL!
UATHelper: Packaging (Windows (64-bit)):   LogNiagaraCompiler: Error: Skeletal Mesh DI Function GetTriPositionWS has been deprecated. Use GetSinnedTriangleData or GetSkinnedTriangleDataWS instead.
UATHelper: Packaging (Windows (64-bit)):    - Node: Get Tri Position WS - Callstack: SpawnScript.MyScript
UATHelper: Packaging (Windows (64-bit)):   LogNiagaraCompiler: Error: Incorect number of outputs. Can possibly be fixed with a graph refresh. - Node: Get Tri Position WS - Callstack: SpawnScript.MyScript
UATHelper: Packaging (Windows (64-bit)):   LogNiagaraCompiler: Error: Error compiling input on Lerp node. - Node: Lerp Pin: A - Callstack: SpawnScript.MyScript
UATHelper: Packaging (Windows (64-bit)):   LogNiagaraCompiler: Error: Skeletal Mesh DI Function GetTriPositionWS has been deprecated. Use GetSinnedTriangleData or GetSkinnedTriangleDataWS instead.
UATHelper: Packaging (Windows (64-bit)):    - Node: Get Tri Position WS - Callstack: SpawnScript.MyScript
UATHelper: Packaging (Windows (64-bit)):   LogNiagaraCompiler: Error: Incorect number of outputs. Can possibly be fixed with a graph refresh. - Node: Get Tri Position WS - Callstack: SpawnScript.MyScript
UATHelper: Packaging (Windows (64-bit)):   LogNiagaraCompiler: Error: Error compiling input for convert node. - Node: Break Vector Pin: Input 1 - Callstack: SpawnScript.MyScript
UATHelper: Packaging (Windows (64-bit)):   LogNiagaraCompiler: Error: The HLSL Translator failed to generate HLSL!
PackagingResults: Error: Skeletal Mesh DI Function GetTriPositionWS has been deprecated. Use GetSinnedTriangleData or GetSkinnedTriangleDataWS instead.
PackagingResults: Error: Incorect number of outputs. Can possibly be fixed with a graph refresh. - Node: Get Tri Position WS - Callstack: UpdateScript.MyScript
PackagingResults: Error: Error compiling input for convert node. - Node: Break Vector Pin: Input 1 - Callstack: UpdateScript.MyScript
PackagingResults: Error: The HLSL Translator failed to generate HLSL!
PackagingResults: Error: Skeletal Mesh DI Function GetTriPositionWS has been deprecated. Use GetSinnedTriangleData or GetSkinnedTriangleDataWS instead.
PackagingResults: Error: Incorect number of outputs. Can possibly be fixed with a graph refresh. - Node: Get Tri Position WS - Callstack: SpawnScript.MyScript
PackagingResults: Error: Error compiling input on Lerp node. - Node: Lerp Pin: A - Callstack: SpawnScript.MyScript
PackagingResults: Error: Skeletal Mesh DI Function GetTriPositionWS has been deprecated. Use GetSinnedTriangleData or GetSkinnedTriangleDataWS instead.
PackagingResults: Error: Incorect number of outputs. Can possibly be fixed with a graph refresh. - Node: Get Tri Position WS - Callstack: SpawnScript.MyScript
PackagingResults: Error: Error compiling input for convert node. - Node: Break Vector Pin: Input 1 - Callstack: SpawnScript.MyScript
PackagingResults: Error: The HLSL Translator failed to generate HLSL!
UATHelper: Packaging (Windows (64-bit)):   LogNiagara: Error: Skeletal Mesh DI Function GetTriPositionWS has been deprecated. Use GetSinnedTriangleData or GetSkinnedTriangleDataWS instead.
Solution

1, Disable Niagara: Settings -> Plugins -> FX , disable all plugins related Niagara.

2, Modify engine source:
Engine\Source\Runtime\CoreUObject\Private\Misc\PackageName.cpp

Change this Log Level to Warning in function FPackageName::DoesPackageExist(), origin is Error

if ( !FPackageName::IsValidLongPackageName( PackageName, true, &Reason ) )
{
    UE_LOG(LogPackageName, Warning, TEXT( "DoesPackageExist: DoesPackageExist FAILED: '%s' is not a standard unreal filename or a long path name. Reason: %s"), *LongPackageName, *Reason.ToString() );
    return false;
}

This modification’s purpose is to ignore following error log:

UATHelper: Packaging (Windows (64-bit)):   LogInit: Display: LogPackageName: Error: DoesPackageExist: DoesPackageExist FAILED: '/Niagara/DefaultAssets/DefaultSpriteMaterial' is not a standard unreal filename or a long path name. Reason: Path does not start with a valid root. Path must begin with: '/Engine/', '/Game/', '/Paper2D/', '/AnimationSharing/', '/Cry

正是一个人怎么看待自己,决定了此人的命运,指向了他的归宿。 ——亨利·戴维·梭罗《瓦尔登湖》