我的错误是
PS F:\My Doc\MasterThesis\JAVA Framework\ionic\ionic-apiai> ionic cordova build android
> ng.cmd run app:ionic-cordova-build --platform=android
An unhandled exception occurred: compiler.getInfrastructureLogger is not a function
See "C:\Users\HACKER~1\AppData\Local\Temp\ng-u8euta\angular-errors.log" for further details.
[ERROR] An error occurred while running subprocess ng.
ng.cmd run app:ionic-cordova-build --platform=android exited with exit code 127.
Re-running this command with the --verbose flag may provide more information.
PS F:\My Doc\MasterThesis\JAVA Framework\ionic\ionic-apiai> ionic cordova platform add android
√ Creating .\www directory for you - done!
Platform android already exists.
PS F:\My Doc\MasterThesis\JAVA Framework\ionic\ionic-apiai> ionic serve
> ng.cmd run app:serve --host=localhost --port=8100
[ng] i 「wds」: Project is running at http://localhost:8100/webpack-dev-server/
[ng] i 「wds」: webpack output is served from /
[ng] i 「wds」: 404s will fallback to //index.html
[ng] chunk {main} main.js, main.js.map (main) 2.58 kB [initial] [rendered]
[ng] chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 149 kB [initial] [rendered]
[ng] chunk {runtime} runtime.js, runtime.js.map (runtime) 6.07 kB [entry] [rendered]
[ng] chunk {styles} styles.js, styles.js.map (styles) 101 kB [initial] [rendered]
[ng] chunk {vendor} vendor.js, vendor.js.map (vendor) 343 kB [initial] [rendered]
[ng]
[ng] ERROR in ../node_modules/@angular/common/common.d.ts:1208:17 - error TS2304: Cannot find name 'unknown'.
[ng] 1208 getState(): unknown;
[ng] ~~~~~~~
[ng] ../node_modules/@angular/common/common.d.ts:1271:42 - error TS2304: Cannot find name 'unknown'.
[ng] 1271 onUrlChange(fn: (url: string, state: unknown) => void): void;
[ng] ~~~~~~~
[ng] ../node_modules/@angular/common/common.d.ts:2423:26 - error TS2304: Cannot find name 'unknown'.
[ng] 2423 abstract getState(): unknown;
[ng] ~~~~~~~
[ng] ../node_modules/@angular/core/core.d.ts:214:21 - error TS1039: Initializers are not allowed in ambient contexts.
[ng] 214 readonly done = false;
[ng] ~~~~~
[ng] ../node_modules/@angular/core/core.d.ts:5352:22 - error TS1039: Initializers are not allowed in ambient contexts.
[ng] 5352 readonly dirty = true;
[ng] ~~~~
[ng] ../node_modules/@angular/core/core.d.ts:10292:36 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal.
[ng] 10292 export declare const ɵivyEnabled = false;
[ng] ~~~~~
[ng] ../node_modules/@angular/core/core.d.ts:10963:55 - error TS1254: A 'const' initializer in an ambient context must be a string or numeric literal.
[ng] 10963 export declare const ɵSWITCH_IVY_ENABLED__POST_R3__ = true;
[ng] ~~~~
[ng] ../node_modules/@angular/core/core.d.ts:11961:12 - error TS2304: Cannot find name 'unknown'.
[ng] 11961 token: unknown;
[ng] ~~~~~~~
[ng] ../node_modules/@angular/core/core.d.ts:12448:12 - error TS2304: Cannot find name 'unknown'.
[ng] 12448 token: unknown;
[ng] ~~~~~~~
[ng] ../node_modules/@angular/platform-browser/platform-browser.d.ts:753:17 - error TS2304: Cannot find name 'unknown'.
[ng] 753 getState(): unknown;
[ng] ~~~~~~~
[ng] ../node_modules/@ionic-native/core/decorators/common.d.ts:10:118 - error TS2304: Cannot find name 'unknown'.
[ng] 10 export declare function wrapPromise(pluginObj: any, methodName: string, args: any[], opts?: CordovaOptions): Promise<unknown>;
[ng] ~~~~~~~
[ng] ../node_modules/rxjs/index.d.ts:10:39 - error TS2307: Cannot find module './internal/scheduler/asap'.
[ng] 10 export { asap as asapScheduler } from './internal/scheduler/asap';
[ng] ~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ng] ../node_modules/rxjs/index.d.ts:11:41 - error TS2307: Cannot find module './internal/scheduler/async'.
[ng] 11 export { async as asyncScheduler } from './internal/scheduler/async';
[ng] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ng] ../node_modules/rxjs/index.d.ts:12:41 - error TS2307: Cannot find module './internal/scheduler/queue'.
[ng] 12 export { queue as queueScheduler } from './internal/scheduler/queue';
[ng] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ng] ../node_modules/rxjs/index.d.ts:13:59 - error TS2307: Cannot find module './internal/scheduler/animationFrame'.
[ng] 13 export { animationFrame as animationFrameScheduler } from './internal/scheduler/animationFrame';
[ng] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ng] ../node_modules/rxjs/index.d.ts:14:53 - error TS2307: Cannot find module './internal/scheduler/VirtualTimeScheduler'.
[ng] 14 export { VirtualTimeScheduler, VirtualAction } from './internal/scheduler/VirtualTimeScheduler';
[ng] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ng] ../node_modules/rxjs/internal/Scheduler.d.ts:1:24 - error TS2307: Cannot find module './scheduler/Action'.
[ng] 1 import { Action } from './scheduler/Action';
[ng] ~~~~~~~~~~~~~~~~~~~~
[ng]
[ng] Date: 2019-11-17T04:43:43.415Z - Hash: 75bc71a13f792a6a66fe - Time: 3731ms
[ng] i 「wdm」: Failed to compile.
[INFO] Development server running!
Local: http://localhost:8100
Use Ctrl+C to quit this process
[INFO] Browser window opened to http://localhost:8100!
{
"name": "ionic-apiai",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/common": "~8.1.3",
"@angular/core": "~8.1.3",
"@angular/forms": "~8.1.3",
"@angular/platform-browser": "~8.1.3",
"@angular/platform-browser-dynamic": "~8.1.3",
"@angular/router": "~8.1.3",
"@ionic-native/core": "^5.0.0",
"@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/status-bar": "^5.0.0",
"@ionic/angular": "^4.7.1",
"@ionic/lab": "^2.0.13",
"@reactivex/rxjs": "^5.0.0",
"@types/react": "16.9.11",
"@types/react-dom": "16.9.4",
"clean-webpack-plugin": "3.0.0",
"cordova-android": "8.1.0",
"cordova-plugin-apiai": "^1.7.4",
"core-js": "^2.5.4",
"core-util-is": "^1.0.2",
"generator-ngx-rocket": "^7.1.0",
"html-webpack-plugin": "3.2.0",
"natives": "^1.1.6",
"node-schedule": "^1.3.2",
"react": "16.12.0",
"react-dom": "16.12.0",
"rxjs": "^6.5.3",
"rxjs-compat": "^6.5.3",
"ts-loader": "6.2.1",
"tslib": "^1.9.0",
"webpack": "^4.29.6",
"webpack-dev-server": "^3.4.1",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/architect": "~0.803.19",
"@angular-devkit/build-angular": "^0.803.19",
"@angular-devkit/core": "~8.3.19",
"@angular-devkit/schematics": "~8.3.19",
"@angular/cli": "8.3.19",
"@angular/compiler": "~8.2.14",
"@angular/compiler-cli": "^6.1.1",
"@angular/language-service": "~8.2.144",
"@ionic/angular-toolkit": "^2.1.1",
"@ionic/app-scripts": "^3.2.4",
"@types/jasmine": "~3.4.6",
"@types/jasminewd2": "~2.0.8",
"@types/node": "~12.12.8.8.8",
"api-ai-javascript": "^2.0.0-beta.21",
"awesome-typescript-loader": "^5.2.1",
"codelyzer": "^5.2.0",
"cordova-plugin-device": "^2.0.3",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^4.1.3",
"cordova-plugin-splashscreen": "^5.0.3",
"cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-whitelist": "^1.3.4",
"eslint": "^6.6.0",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.4.1",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.0",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"protractor": "~5.4.2",
"schedule": "^0.5.0",
"ts-node": "~8.5.2",
"tslint": "~5.20.1",
"typescript": "^2.9.2",
"webpack-cli": "^3.3.10"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-apiai": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-ionic-keyboard": {}
},
"platforms": [
"android"
]
}
}
离子:
Ionic CLI : 5.4.2 (C:\Users\Hacker292\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.11.5 (F:\My Doc\MasterThesis\JAVA Framework\ionic\node_modules\@ionic\angular)
@angular-devkit/build-angular : 0.803.19
@angular-devkit/schematics : 8.3.19
@angular/cli : 8.3.19
@ionic/angular-toolkit : 2.1.1 (F:\My Doc\MasterThesis\JAVA Framework\ionic\node_modules\@ionic\angular-toolkit)
科尔多瓦:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.1.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 5 other plugins)
实用程序:
cordova-res : not installed
native-run : 0.2.9
系统:
Android SDK Tools : 26.1.1 (F:\Android\android-sdk)
NodeJS : v12.11.0 (C:\Program Files\nodejs\node.exe)
npm : 6.13.0
OS : Windows 10