Bonjour, La connexion avec les scripts ionic-app continue avec service ionique - laboratoire?
[app-scripts] [18:17:21] tslint: ...orkSpace_Ionic3_MobileApp/prototype/src/pages/profile-details/profile-details.ts, line: 2
[INFO] Waiting for connectivity with ionic-app-scripts...
[INFO] Waiting for connectivity with ionic-app-scripts...
[INFO] Waiting for connectivity with ionic-app-scripts...
Infos ioniques:
Ionique:
ionic (Ionic CLI) : 4.0.3 (C:\Users\user\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.11
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : browser 5.0.3
System:
Android SDK Tools : 26.1.1
NodeJS : v9.1.0 (C:\Program Files\nodejs\node.exe)
npm : 5.5.1
OS : Windows 10
Environment:
Android_HOME : C:\Users\user2\AppData\Local\Android\Sdk
Ci-dessous, j'ai mis à jour le fichier mine package.json . package.json
{
"name": "name",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build --aot --minifyjs --minifycss --release",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
Essayeznpm run start
au lieu deionic serve
. Cela fonctionnera.
La raison en est que l'application commence par l'adresse IP 0.0.0.0 . Essayez d'ajouter notre commande "--address localhost" part . Donc.
ionic serve --address localhost
Essayez la partie modifiée. Et essayez d’exécuter la commande "npm start"
{
"name": "name",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build --aot --minifyjs --minifycss --release",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"start": "ionic-app-scripts serve" //instead of ionic:serve, write start
},