2017-09-14 2 views
0

既存のIonic/Cordovaプロジェクトに追加のCordovaプラグインをインストールするにはどうすればよいですか?私はCordova Battery-Status Pluginが必要です。私がしようとした場合:私はこれを取得していIonic/Cordova:イオン性ネイティブプラグインのインストール方法

ionic cordova plugin add cordova-plugin-battery-status 

Error: Failed to fetch plugin cordova-plugin-battery-status via registry. 
    Probably this is either a connection problem, or plugin spec is incorrect. 
    Check your connection and plugin name/version/URL. 
    Error: cmd: Command failed with exit code 4294963248 Error output: 
    npm ERR! path 
    C:\development\ionic\baterry-status\battery_test\node_modules\fsevents\node_modules\ansi-regex\package.json 
    npm ERR! code EPERM 
    npm ERR! errno -4048 
    npm ERR! syscall unlink 
    npm ERR! Error: EPERM: operation not permitted, unlink 
    'C:\development\ionic\baterry-status\battery_test\node_modules\fsevents\node_modules\ansi-regex\package.json' 
    npm ERR!  at Error (native) 
    npm ERR! { Error: EPERM: operation not permitted, unlink 
    'C:\development\ionic\baterry-status\battery_test\node_modules\fsevents\node_modules\ansi-regex\package.json' 
    npm ERR!  at Error (native) 
    npm ERR! stack: 'Error: EPERM: operation not permitted, unlink 
    \'C:\\development\\ionic\\baterry-status\\battery_test\\node_modules\\fsevents\\node_modules\\ansi-regex\\package.json\'\n 
     at Error (native)', 
    npm ERR! errno: -4048, 
    npm ERR! code: 'EPERM', 
    npm ERR! syscall: 'unlink', 
    npm ERR! path: 
    'C:\\development\\ionic\\baterry-status\\battery_test\\node_modules\\fsevents\\node_modules\\ansi-regex\\package.json' 
    } 
    npm ERR! 
    npm ERR! Please try running this command again as root/Administrator. 

    npm ERR! A complete log of this run can be found in: 
    npm ERR!  C:\Users\Administrador\AppData\Roaming\npm-cache\_logs\2017-09-14T14_55_19_022Z-debug.log 
+0

に行き、ここでは詳細について

cordova plugin add cordova-plugin-battery-status 

enter image description here

を投稿する前にテストしていますか? –

+0

私は最後に3.10.3のバージョン –

+0

を持っています。rootとしてコマンドを実行するように求めています。あなたがcordovaプラグインをインストールするためにsudoをする必要があるのはなぜか分かりませんが、それを試しましたか? –

答えて

関連する問題