Error: Uncaught (in promise): Error: No provider for Token LZYCMP!

Hi, I’m new here on ionic. I got this error trying to make the modal work. could you help me?

Thank you very much in advance

Topo.ts

import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams, ViewController, ModalController } from 'ionic-angular';
import { ServicesNav } from '../../providers/services-nav';
import { SpeechProvider } from '../../providers/speech/speech';
import { BarcodeProvider } from '../../providers/barcode/barcode';
import { ProductImageHelper } from '../../util/product-image-helper';
import { StorageProvider } from '../../providers/storage/storage';
import { MenuNotificationProvider } from '../../providers/menu-notification/menu-notification';

//modal teste
//import { ModalBuscaPage } from '../../pages/modal-busca/modal-busca';
//modal teste


/**
 * Generated class for the Topo component.
 *
 * See https://angular.io/docs/ts/latest/api/core/index/ComponentMetadata-class.html
 * for more info on Angular Components.
 */
@IonicPage()
@Component({
  selector: 'topo',
  templateUrl: 'topo.html'
})
export class Topo {

  public searchText : string;
  tituloBarra = "JáCotei";
  
  searchQuery: string = '';
  suggest : any = {};
  imgHelper = ProductImageHelper;

  rewards : any[] = [];

  constructor(
    private barcode: BarcodeProvider, 
    public servicesNav : ServicesNav,
    public navCtrl: NavController,
    public navParams: NavParams,
    private speech: SpeechProvider, 
    private storageProvider:StorageProvider,
    private menuNotificationProvider:MenuNotificationProvider,
    private viewCtrl: ViewController,
    //modal
    public modal: ModalController
  ) {
  }

  //modal
  openModal(){
    let modal = this.modal.create('ModalBuscaPage');
    modal.present();
  }
  
  scan(){
    this.barcode.scan().subscribe(code => {
      if(code){
        this.servicesNav.push('resultadoBusca', {searchText : code, analyzer : 'literal'});
      }
    })
  }
 
  speak(){
    this.speech.speak().subscribe(text => {
      if(text){
        this.searchText = text;
        this.search();
      }
    });
  }

  typing(ev:any){
    console.log('typing', ev);
  }

  search() {
    console.log('search', this.searchText);
    this.servicesNav.push('resultadoBusca', {searchText : this.searchText});
  }

  openSugest(){
    this.servicesNav.push('suggest');
  }

  hasNotifications() : boolean {
    return this.menuNotificationProvider.hasNotifications();
  }

  goBack() {
    this.viewCtrl.dismiss();
  }

  isChild() : boolean {
    if (this.navCtrl.length() - 1 == 0) {
      return false;
    }else{
      return true;
    }
  }
}

modal-busca.module.ts

import { NgModule } from '@angular/core';
import { IonicModule } from 'ionic-angular';
import { ModalBuscaPage } from './modal-busca';

@NgModule({
  declarations: [
    ModalBuscaPage,
  ],
  // imports: [
  //   IonicModule.forChild(ModalBuscaPage),
  // ],
  exports: [
    ModalBuscaPage
  ]
})
export class ModalBuscaPageModule {}

modal-busca.ts

import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';

/**
 * Generated class for the ModalBuscaPage page.
 *
 * See http://ionicframework.com/docs/components/#navigation for more info
 * on Ionic pages and navigation.
 */
@IonicPage()
@Component({
  selector: 'page-modal-busca',
  templateUrl: 'modal-busca.html',
})
export class ModalBuscaPage {

  constructor(public navCtrl: NavController, public navParams: NavParams) {
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad ModalBuscaPage');
  }

}

I cant find any issues in your code, it seems that everything is okay, except by this comment in constructor, but I think this is not the problem, but just to confirm, try to remove that.

All of your workflows seams to be right; Maybe the error is not inside this component or page.

Hi Leonard, thanks for the support. I did a search on the internet and the only answer was because of the ionic version, but it was in version 2.0 I believe this is already fixed. I’m not sure what the mistake might be, I’ll keep looking.