Error: The engine "cli" appears to be invalid

Cannot update Ghost to 4.42 version

warning " > bookshelf@1.2.0" has incorrect peer dependency “knex@>=0.15.0 <0.22.0”.

[5/5] Building fresh packages...


--------------- stderr ---------------
warning ghost@4.42.0: The engine "cli" appears to be invalid.
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@^2.29.1"
warning Resolution field "moment-timezone@0.5.23" is incompatible with requested version "moment-timezone@^0.5.33"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@^2.29.1"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@^2.27.0"
warning Resolution field "moment-timezone@0.5.23" is incompatible with requested version "moment-timezone@^0.5.31"
warning Resolution field "moment-timezone@0.5.23" is incompatible with requested version "moment-timezone@0.5.34"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@2.27.0"
warning Resolution field "@tryghost/logging@2.1.2" is incompatible with requested version "@tryghost/logging@2.1.1"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@2.27.0"
warning Resolution field "moment@2.24.0" is incompatible with requested version "moment@^2.29.1"
warning " > bookshelf@1.2.0" has incorrect peer dependency "knex@>=0.15.0 <0.22.0".


Debug Information:
    OS: Ubuntu, v20.04.4 LTS
    Node Version: v16.14.2
    Ghost Version: 4.40.0
    Ghost-CLI Version: 1.19.2
    Environment: production
    Command: 'ghost update -V'

1 GB RAM was not enough.