ionic4+angular7 APP文件放到ios 环境里面运行报错 ,度娘不出来。
[etengdeMacBook:snjt-ec-mobile-new yiteng$ ionic serve
> ionic-app-scripts serve --address localhost --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser
[app-scripts] [11:21:07] ionic-app-scripts 3.2.4
[app-scripts] [11:21:07] watch started ...
[app-scripts] [11:21:07] build dev started ...
[app-scripts] [11:21:08] typescript error
[app-scripts] Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom',
[app-scripts] 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator',
[app-scripts] 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol',
[app-scripts] 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string',
[app-scripts] 'es2017.intl', 'esnext.asynciterable'.
[app-scripts] [11:21:08] ionic-app-script task: "serve"
[app-scripts] [11:21:08] TypeError: Cannot read property 'replace' of null
[app-scripts] TypeError: Cannot read property 'replace' of null
[app-scripts] at Object.escapeHtml (/Users/yiteng/Desktop/snjt-ec-mobile-new/node_modules/@ionic/app-scripts/dist/util/helpers.js:253:10)
[app-scripts] at generateCodeBlock (/Users/yiteng/Desktop/snjt-ec-mobile-new/node_modules/@ionic/app-scripts/dist/logger/logger-diagnostics.js:187:77)
[app-scripts] at generateDiagnosticHtml (/Users/yiteng/Desktop/snjt-ec-mobile-new/node_modules/@ionic/app-scripts/dist/logger/logger-diagnostics.js:179:12)
[app-scripts] at Array.map (<anonymous>)
[app-scripts] at Object.printDiagnostics (/Users/yiteng/Desktop/snjt-ec-mobile-new/node_modules/@ionic/app-scripts/dist/logger/logger-diagnostics.js:15:39)
[app-scripts] at getTsConfig (/Users/yiteng/Desktop/snjt-ec-mobile-new/node_modules/@ionic/app-scripts/dist/transpile.js:322:34)
[app-scripts] at Object.<anonymous> (/Users/yiteng/Desktop/snjt-ec-mobile-new/node_modules/@ionic/app-scripts/dist/transpile.js:298:46)
[app-scripts] at step (/Users/yiteng/Desktop/snjt-ec-mobile-new/node_modules/@ionic/app-scripts/dist/transpile.js:32:23)
[app-scripts] at Object.next (/Users/yiteng/Desktop/snjt-ec-mobile-new/node_modules/@ionic/app-scripts/dist/transpile.js:13:53)
[app-scripts] at /Users/yiteng/Desktop/snjt-ec-mobile-new/node_modules/@ionic/app-scripts/dist/transpile.js:7:71
[ERROR] ionic-app-scripts has unexpectedly closed (exit code 1).
The Ionic CLI will exit. Please check any output above for error details.
搜索src文件内的 replace 方法 加上了 if(value){ }