Oops! Unable to find all parameters required for setting up the platform: (?,?, [object Object], [object Object])

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.

Answer №1

While troubleshooting, I encountered the same error message. By using Inspect with Chrome Developer Tools, I was able to trace it back to a hasunknowdependency = true error related to "PLTCONFIG" within the NgModules. Upon further investigation, I discovered that the missing parameter causing this issue was the "doc" parameter of setupPlatform(). This led me to realize that the "DOCUMENT" was no longer being exported from platform-browser, which is discussed in more detail here. After implementing the necessary changes based on this information, the error ceased to occur. Hopefully, my experience can be helpful to others facing a similar problem.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Challenges encountered when extracting colors from an object/model using ngStyle

I created a unique shape using html/Css and now I want to fetch its color from a data service. [ngStyle]="{'background-color':'#0B0036'}" Everything works perfectly when I use the above code. However, when I try either of the followin ...

Exploring Multi-Level TileMaps in Phaser 3 with JSON

My game currently only restarts on the same tilemap, even when the key is set to level-2. I'm trying to figure out the best way to implement multiple levels. I attempted a solution where "level-2" was designated as the key, but the tilemap failed to ...

Issues arise with transferring React component between different projects

My goal is to develop a React component that serves as a navigation bar. This particular component is intended to be imported from a separate file into my App.js. Currently, the component is designed to simply display a 'Hello world' paragraph, ...

Guide on incorporating text input areas into specific positions within a string

Looking for a way to replace specific words in a string with input fields to enter actual values? For example... Dear Mr. [Father_name], your son/daughter [name] did not attend class today. This is what I want it to look like... Dear Mr. Shankar, your ...

leveraging two connected hooks

I am facing a challenge where I need to utilize two hooks that are interdependent: useHook1() provides a list of ids, and useHook2(id) is called for each id to retrieve a corresponding name. Essentially, what I aim to achieve is: const [allData, setData] ...

Closing ngx-bootstrap modal post unit tests

After enabling the CSS style in the unit tests of my Angular app, I noticed that every time a component displaying a modal from ngx-bootstrap appears, it remains visible in the browser even after the unit tests for that component have completed running. T ...

Tips for fixing TypeScript compiler error TS2339: Issue with accessing 'errorValue' property in Angular 5 project

Within a component, I have developed a function to manage errors returned from a Rest Service and determine the corresponding error message to display to the user. This method accepts an error object (custom data structure from the service), navigates to e ...

Adding a new row with the click of a button in Angular 4 can be achieved by following these steps:

https://i.sstatic.net/T4Wgg.pngI am working on a code snippet that creates a row and a button named Add Person. When Add Person is clicked, I need to dynamically generate additional rows with Person 2, Person 3, and so on. https://i.sstatic.net/VCzvO.png ...

How to Redirect between Controllers in Nest.Js

I'm currently working with a module that looks like this: @Module({ imports: [], controllers: [AppController, AnotherController], providers: [], }) Within the AppController, I am attempting to implement res.redirect('/books') which r ...

What is the best way to center align and add an icon to the header in Ionic?

How can I center align an "ion-ios-arrow-up" icon in the header of my Ionic app, similar to the concept shown below? This is my HTML template: <ion-view cache-view="false" view-title="Historical HPP"> <ion-nav-bar class="nav-title-slide-ios7 ...

The argument with type 'void' cannot be assigned to a parameter with type 'Action'

Just getting started with Typescript and using VSCode. Encountering the following Error: *[ts] Argument of type 'void' is not assignable to parameter of type 'Action'. (parameter) action: void Here is the code snippet causing the err ...

The argument type 'string' does not match the parameter type 'keyof Chainable' in Cypress JavaScript

Trying to incorporate a unique custom command in Cypress (commands.js file) as follows: Cypress.Commands.add("login", (email, password) => { cy.intercept('POST', '**/auth').as('login'); cy.visit(& ...

angular primeng table has a checkbox to select all checkboxes

Is there a way to check all checkboxes in a table when the checkbox in the table header is clicked? I am currently utilizing angular 12 and primeNG table for this functionality. <p-table styleClass="text-sm" [value]="value" [loading] ...

Unable to include @angular/pwa

When attempting any of the following: ng add @angular/pwa ng add @angular/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1a6a6d7b5a2b2d342b342a">[email protected]</a> --legacy-peer-deps ng add @angular/<a href= ...

Passing data from an Angular 2 bootstrap modal

As a new user of Angular 2, I am currently trying to implement basic CRUD operations. However, I have encountered an issue with utilizing Bootstrap modal. Although the code successfully opens the Bootstrap modal, I am facing difficulties sending the sele ...

How to turn off automatic password suggestions in Chrome and Firefox

Currently, I have integrated a 'change password' feature which includes fields for 'old password', 'new password', and 'retype password'. However, the autocomplete feature is suggesting passwords from other user acco ...

Unable to access the inner object using key-value pair in Angular when working with Firebase

Within my json object, there is an inner object labeled data, containing {count: 9, message: "9 sites synced"} as its contents - also in json format. My objective is to extract the value from message, rather than count. Provided below is the temp ...

Broaden the base nodes within Angular Material Tree

I am aware that there are ways to expand and collapse all nodes, but I only desire to expand the initial level of nodes (the root nodes). Is it feasible to do this? ...

The NgSwitch is behaving unexpectedly, throwing an exception with the message "No provider for NgSwitch"

My HTML code snippet is shown below: <ng-container *ngIf="col.data !== ''"> <ng-template [ngSwitch]="col.data"> <ng-container *ngSwitchCase="'Page'"> <div>{{g ...

Steps for importing the config ts file into another ts file in Ionic 2

When trying to import the app.config.ts file in another ts file such as /pages/home/home.ts, I have included the following code in app.config: import { OpaqueToken } from "@angular/core"; export let APP_CONFIG = new OpaqueToken("app.config"); e ...