After upgrading Angular to version 8, I encountered a minor issue while trying to start the app with Ionic serve.
Error: Can't resolve all parameters for setupPlatform: (?, [object
Object], [object Object]).
at syntaxError (http://localhost:8100/build/vendor.js:177346:17)
at CompileMetadataResolver._getDependenciesMetadata
(http://localhost:8100/build/vendor.js:196072:35)
at CompileMetadataResolver._getFactoryMetadata
(http://localhost:8100/build/vendor.js:195972:51)
at CompileMetadataResolver.getProviderMetadata
(http://localhost:8100/build/vendor.js:196204:43)
at http://localhost:8100/build/vendor.js:196134:49
at Array.forEach (<anonymous>)
at CompileMetadataResolver._getProvidersMetadata
(http://localhost:8100/build/vendor.js:196094:19)
at http://localhost:8100/build/vendor.js:195717:119
at Array.forEach (<anonymous>)
at CompileMetadataResolver.getNgModuleMetadata
(http://localhost:8100/build/vendor.js:195708:49)
Even after reverting to a previous version, I still faced the same challenge. Interestingly, another Ionic app I have works well with the current configuration.
The configurations are as follows:
Ionic:
Ionic CLI : 5.2.1
Ionic Framework : ionic-angular 3.9.6
@ionic/app-scripts : 3.2.4
Cordova:
Cordova CLI : 6.5.0
Cordova Platforms : android 6.1.2, browser 4.1.0, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-webview 1.2.1, (and 16 other plugins)
Utility:
cordova-res : 0.5.1
native-run : 0.2.7
System:
NodeJS : v10.15.1 (/usr/local/bin/node)
npm : 6.9.0
OS : macOS Mojave
Angular CLI: 7.3.0
Node: 10.15.1
OS: darwin x64
Angular: 8.0.3
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.13.0 (cli-only)
@angular-devkit/build-optimizer 0.0.35
@angular-devkit/core 7.3.0 (cli-only)
@angular-devkit/schematics 7.3.0 (cli-only)
@angular/fire 5.2.1
@angular/http 7.2.15
@schematics/angular 7.3.0 (cli-only)
@schematics/update 0.13.0 (cli-only)
rxjs 6.5.2
typescript 3.5.2
webpack 3.12.0
I am puzzled by the reference to setupPlatform, which is not part of my written code. It seems to be associated with an add-on plugin, but my search in VS Code did not match any occurrence of setupPlatform. I am finding it challenging to find a solution as no similar issues have been reported in my searches. Any help on this matter would be greatly appreciated.
Thank you.