When I add "cordova-plugin-screen-orientation" it error

cordova plugin add cordova-plugin-screen-orientation --save
:heavy_multiplication_x: Running command - failed!

[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.

[ERROR] An error occurred while running cordova plugin add
cordova-plugin-screen-orientation --save (exit code 1):

    Installing "cordova-plugin-screen-orientation" for android
    Failed to install 'cordova-plugin-screen-orientation': Error
    at
    /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:205:33
    at _rejected
    (/usr/local/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:864:24)
    at
    /usr/local/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:890:30
    at Promise.when
    (/usr/local/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:1142:31)
    at Promise.promise.promiseDispatch
    (/usr/local/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:808:41)
    at
    /usr/local/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:624:44
    at runSingle
    (/usr/local/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:137:13)
    at flush
    (/usr/local/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:95:7)
    at process._tickCallback (internal/process/next_tick.js:161:9)
    Error: Failed to fetch plugin
    https://github.com/vstirbu/PromisesPlugin.git via registry.
    Probably this is either a connection problem, or plugin spec is
    incorrect.
    Check your connection and plugin name/version/URL.
    Failed to get absolute path to installed module

Did you manage to install the plugin?

yes, the plugin not error, the problem is about Cordova cli and android version. downgrade Cordova to 6.5.0, and use latest android platform