Tengo una duda y espero que alguien pueda ayudarme.
Cuando ejecuto ionic serve tengo el siguiente error:
[app-scripts] [15:04:28] transpile started ... [app-scripts] [15:04:42] typescript: ...aceIcaro_5_3B/dev-app/app/node_modules/@ionic-native/core/decorators/common.d.ts, line: 10 [app-scripts] Cannot find name 'unknown'. [app-scripts] L9: export declare function wrapPromise(pluginObj: any, methodName: string, args: any[], opts?: CordovaOptions): Promise; [app-scripts] L11: * Checks if plugin/cordova is available
He leído que si se cambia unknown por any en la línea 10 de common.d.ts en @ionic-native/core/decorators, el error desaparece. Es cierto pero quiero saber la razón.
Mis dependencias en package.json son:
"dependencies": { "@angular/animations": "^5.2.11", "@angular/common": "^5.2.11", "@angular/compiler": "^5.2.11", "@angular/compiler-cli": "^5.2.11", "@angular/core": "^5.2.11", "@angular/forms": "^5.2.11", "@angular/http": "^5.2.11", "@angular/platform-browser": "^5.2.11", "@angular/platform-browser-dynamic": "^5.2.11", "@angular/router": "^5.2.11", "@auth0/angular-jwt": "^1.2.0", "@ionic-native/app-version": "5.14.0", "@ionic-native/core": "5.14.0", "@ionic-native/date-picker": "5.14.0", "@ionic-native/file": "^5.14.0", "@ionic-native/file-opener": "^5.14.0", "@ionic-native/globalization": "5.14.0", "@ionic-native/in-app-browser": "5.14.0", "@ionic-native/ionic-webview": "5.14.0", "@ionic-native/splash-screen": "5.14.0", "@ionic-native/status-bar": "5.14.0", "@ionic/storage": "2.2.0", "@ngx-translate/core": "^9.1.1", "@ngx-translate/http-loader": "^2.0.1", "@types/lodash": "4.14.118", "cordova": "^9.0.0", "cordova-android": "8.1.0", "cordova-browser": "6.0.0", "cordova-ios": "5.0.1", "cordova-plugin-app-version": "^0.1.9", "cordova-plugin-datepicker": "^0.9.3", "cordova-plugin-device": "^2.0.3", "cordova-plugin-file": "^6.0.2", "cordova-plugin-file-opener2": "^2.2.1", "cordova-plugin-globalization": "^1.11.0", "cordova-plugin-inappbrowser": "^3.1.0", "cordova-plugin-ionic-keyboard": "^2.2.0", "cordova-plugin-ionic-webview": "^4.1.2", "cordova-plugin-splashscreen": "^5.0.3", "cordova-plugin-statusbar": "git+https://github.com/apache/cordova-plugin-statusbar.git", "cordova-plugin-whitelist": "^1.3.4", "ionic-angular": "^3.9.8", "ionic-tooltips": "^2.1.1", "ionic2-super-tabs": "^4.3.1", "ionicons": "^3.0.0", "jwt-decode": "^2.2.0", "lodash": "4.17.11", "moment": "^2.24.0", "ngx-permissions": "^4.1.0", "node-sass": "^4.11.0", "run": "1.4.0", "rxjs": "^5.5.12", "sw-toolbox": "3.6.0", "zone.js": "0.8.26" }, "devDependencies": { "@ionic/app-scripts": "^3.2.2", "@ionic/lab": "1.0.6", "typescript": "2.8.3" }
Muchas gracias por adelantado.