0

This error occurred when i run ionic project "ionic serve".

Ionic Info:

Ionic:

Ionic CLI : 5.4.13 Ionic Framework : ionic-angular 3.9.9 @ionic/app-scripts : 3.2.4

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1) Cordova Platforms : android 8.1.0 Cordova Plugins : no whitelisted plugins (17 plugins total)

Utility:

cordova-res : not installed native-run : 0.3.0

System:

NodeJS : v12.14.0 (/usr/local/bin/node) npm : 6.13.4 OS : macOS Catalina

and this is complete error message in console log

compiler.js:2420 Uncaught Error: Can't resolve all parameters for setupPlatform: (?, [object Object], [object Object]).
at syntaxError (compiler.js:2420)
at CompileMetadataResolver._getDependenciesMetadata (compiler.js:21576)
at CompileMetadataResolver._getFactoryMetadata (compiler.js:21475)
at CompileMetadataResolver.getProviderMetadata (compiler.js:21708)
at compiler.js:21638
at Array.forEach (<anonymous>)
at CompileMetadataResolver._getProvidersMetadata (compiler.js:21598)
at compiler.js:21220
at Array.forEach (<anonymous>)
at CompileMetadataResolver.getNgModuleMetadata (compiler.js:21211)

no clues where and how to find the error.

Any suggestion would help a lot.

Sagar Pawar
  • 465
  • 4
  • 26

2 Answers2

1

please provide some more details regarding the file which is throwing this error.

For the limited content which you have provided, I can assumet that this is a possible duplicate of EXCEPTION: Can't resolve all parameters

Basically, the file is unable to load/detected the injected service, hence leading to this issue.

To resolve this either you need to import in the module as well, or inject it statically.

Hope this might have helped.

0

You might have added any platform-dependent functionalities to your code. So it may not run on a browser. Try running the same in Android or iOS Device.

To simulate in Android you can use the below command. If any Android device is connected it will install in it aswell.

ionic cordova run android

Else take a build and run in device

ionic cordova build <platform>

(i.e) platform either android or ios

Prabhu Anand
  • 530
  • 4
  • 10