1

J'ai installé les plug-ins suivants:CheminFichier ne se trouve pas en natif ionique

ionic plugin add cordova-plugin-camera 
ionic plugin add cordova-plugin-file 
ionic plugin add cordova-plugin-file-transfer 
ionic plugin add cordova-plugin-filepath 

Quand je lance la construction ionique, CheminFichier ne semble pas être trouvé.

J'ai l'instruction d'importation suivante dans mon fichier .ts

import { Camera, File, Transfer, FilePath } from 'ionic-native'; 

Mais CheminFichier ne définit pas natif ionique.

J'utilise ionique 2 Version: 2.1.13 et Cordova Version: 6.4.0

Je reçois l'erreur suivante:

~/workspace/ionic/tracks-driver(master :heavy_check_mark:) ionic build 

[email protected] ionic:build /Users/cnadig-cc/workspace/ionic/tracks-driver 
ionic-app-scripts build 

[09:36:09] ionic-app-scripts 0.0.45 
[09:36:09] build prod started ... 
[09:36:09] clean started ... 
[09:36:09] clean finished in 8 ms 
[09:36:09] copy started ... 
[09:36:09] ngc started ... 
[09:36:09] copy finished in 112 ms 
[09:36:22] Error: Error at /Users/cnadig-cc/workspace/ionic/tracks-driver/.tmp/pages/loads/loads.ts:4:34 
[09:36:22] Module '"/Users/cnadig-cc/workspace/ionic/tracks-driver/node_modules/ionic-native/dist/es5/index"' has no 
exported member 'FilePath'. 
[09:36:22] ngc failed 
[09:36:22] ionic-app-script task: "build" 
[09:36:22] Error: Error 

npm ERR! Darwin 16.1.0 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "ionic:build" "--" 
npm ERR! node v6.9.1 
npm ERR! npm v4.0.2 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] ionic:build: ionic-app-scripts build 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] ionic:build script 'ionic-app-scripts build'. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR! ionic-app-scripts build 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR! npm bugs ionic-hello-world 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR! npm owner ls ionic-hello-world 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR! /Users/cnadig-cc/workspace/ionic/tracks-driver/npm-debug.log 

Répondre

0

Supprimer .tmp (/ Users/cnadig-cc/workspace/ionic/tracks-driver/.tmp) et node_modules et exécutez npm à nouveau l'installation.

+0

J'ai essayé ceci. N'a pas fonctionné. Je reçois toujours la même erreur. –

+0

Pouvez-vous vérifier manuellement si/Users/cnadig-cc/workspace/ionic/pistes-pilote/node_modules/ionic-native/dist/es5/plugins/filepath est là aussi sur index.d.ts – flakerimi

+0

Aucun fichier comme "filepath" existe dans ce répertoire. N'a pas tout à fait obtenir quoi/où j'ai besoin de vérifier index.d.ts. Qu'en est-il de index.d.ts? –