title: ERROR Error: Uncaught (in promise): TypeError: Promise.resolve is not a function TypeError: Promise.resolve is not a function
body: <p>I'm a beginner in ionic 4, when i call my service i have this error </p>
  
  <blockquote>
    <p>ERROR Error: Uncaught (in promise): TypeError: Promise.resolve is not
    a function TypeError: Promise.resolve is not a function</p>
  </blockquote>
  
  <p>my service :</p>
  
  <pre><code>
  import { Injectable } from '@angular/core';
  import PouchDB from 'pouchdb';
  import PouchdbFind from 'pouchdb-find';
  import RelationalPouch from 'relational-pouch';
  
  @Injectable({
    providedIn: 'root'
  })
  export class PouchdbService {
    public remoteDB: any;
    public localDB: any;
  
    constructor() { 
      PouchDB.plugin(RelationalPouch);
      PouchDB.plugin(PouchdbFind);
      this.localDB = new PouchDB('couture');
      this.createDBSchema();
    }
  
  
    public createRelationalDoc(doc){
      return this.localDB.rel.save(doc.type, doc);
    }
  
    public updateRelationalDoc(doc){
      return this.localDB.rel.save(doc.type, doc);
    }
  
    public deleteRelationalDocDefinitivement(doc){
      return this.localDB.rel.del(doc.type, doc);
    }
  
    public findRelationalDocByID(type, id){
      return this.localDB.rel.find(type,id);
    }
  
    public findRelationalDocByTypeAndID(type, id){
      return this.localDB.rel.find(type,id);
    }
  
    public existRelationalDocByTypeAndID(type, id){
      return this.localDB.rel.find(type,id).then((res) =&gt; {
        return true
      }).catch((err) =&gt; {
        return false;
      });
    }
  
  
    public findAllRelationalDocByType(type){
      return this.localDB.rel.find(type);
    }
  
    public findRelationalDocByTypeAndOptions(type, options){
      return this.localDB.rel.find(type, options);
    }
  
    public findRelationalDocHasMany(type, belongsToKey, belongsToId){
      return this.localDB.rel.findHasMany(type, belongsToKey, belongsToId);
    }
  
  
  
  
  
    createDBSchema(){
  
      this.localDB.setSchema([
  
        {
          singular: 'client',
          plural: 'clients',
          relations: {
            'user': {belongsTo: 'user'}
          }
  
        },
        {
          singular: 'tache',
          plural: 'taches',
          relations: {
            'client': {belongsTo: 'client'},
            'user': {belongsTo: 'user'}
          }
        },
        {
          singular: 'user',
          plural: 'users'
        }
      ]);
    }
  </code></pre>
  
  <p>and my page :</p>
  
  <pre><code>import { PouchdbService } from 'src/app/services/pouchdb.service';
  
  @Component({
    selector: 'app-user',
    templateUrl: 'user.page.html',
    styleUrls: ['user.page.scss']
  })
  export class UserPage {
  
    public header:string;
    public user:any;
    public users:any;
    public type:any="user";
  
    constructor( private pouchdbService:PouchdbService) {
        this.getAll();
  
    }
  
    ngOnInit() {
  
    }
  
    ionViewWillEnter(){
  
    }
  
  
    getAll(){
  this.pouchdbService.findAllRelationalDocByType(this.type)
      .then((data) =&gt; {
        console.log(data);
      }).catch((err) =&gt; {
        console.log(err);
      }); 
    }
  }
  </code></pre>
  
  <p>when i call <code>getAll()</code> method i got the following error:</p>
  
  <blockquote>
    <p>Error: Uncaught (in promise): TypeError: Promise.resolve is not a
    function TypeError: Promise.resolve is not a function</p>
  </blockquote>