2017-09-17 6 views
0

Je suis en train d'ajouter le plugin « file » à mon projet Phonegap, mais il est renvoie des erreurs:Ajout erreur-plugin-fichier cordova

d:\Android\projects\myProject>phonegap plugin add cordova-plugin-file 
Error: Failed to fetch plugin git+https://github.com/apache/cordova-plugin-file.git 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 1 Error output: 
npm WARN [email protected] requires a peer of [email protected]>=2.0.0 but none was installed. 
npm WARN [email protected] requires a peer of [email protected]^3.0.0 but none was installed. 
npm WARN [email protected] requires a peer of [email protected]^3.0.0 but none was installed. 
npm WARN [email protected] No repository field. 
npm WARN [email protected] No license field. 
npm ERR! code 1 

Quelle est la bonne façon d'ajouter le plugin « file » à Phonegap/Projet Cordova?

p.s: Je suis sur Windows cmd.

Mise à jour:

Essayer d'ajouter le plugin avec option --save activée:

d:\Android\projects\myProject>phonegap plugin add cordova-plugin-file --save -d 
No scripts found for hook "before_plugin_add". 

No version specified for cordova-plugin-file, retrieving version from package.json 

Calling plugman.fetch on plugin "[email protected]^4.0.0" 

saving 

Running command: cmd "/s /c "D:\xampp\nodejs\npm.cmd install [email protected]^4.0.0 --save"" 

Command finished with error code 1: cmd /s /c "D:\xampp\nodejs\npm.cmd install [email protected]^4.0.0 --save" 

Error: Failed to fetch plugin [email protected]^4.0.0 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 1 Error output: 
npm WARN [email protected] requires a peer of [email protected]^3.0.0 but none was installed. 
npm WARN [email protected] requires a peer of [email protected]^3.0.0 but none was installed. 
npm WARN [email protected] No repository field. 
npm WARN [email protected] No license field. 
npm ERR! code 1 
+0

essayez d'ajouter ceci dans votre config.xml - ' Gandhi

+0

' Erreur: Impossible d'extraire le plugin [email protected] via le registre.' – deeplay

Répondre

0

Il ressemble à son erreur avec la version cordova. Quelle version l'utilisez-vous? Essayez avec une autre version, par exemple 6.5.0

npm i [email protected]

Essayez à nouveau d'installer un plugin

cordova plugin add cordova-plugin-file

Permettez-moi de savoir si cela fonctionne pour vous

+0

n'a pas aidé. La version 210 de Phonegapis 7.0.1 – deeplay