I am getting this error when trying to view my Ionic2 application. I have tried to implement a weather application within my application. I am unsure if this is causing an error.
I am unsure where the error is coming from so I am unsure which code to post, so, please let me know if there is a certain part of code you need to see.
cannot find module “@angular/core/src/metadata/directives”
import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import firebase from 'firebase';
import { firebaseConfig } from './credentials';
import { HomePage } from '../pages/home/home';
import { Unsubscribe } from '@firebase/util';
import {MenuPage} from '../pages/menu/menu';
@Component({
templateUrl: 'app.html'
})
export class MyApp {
rootPage: any;
constructor(
platform: Platform,
statusBar: StatusBar,
splashScreen: SplashScreen
) {
firebase.initializeApp(firebaseConfig);
const unsubscribe: Unsubscribe = firebase.auth().onAuthStateChanged(user => {
if (user) {
this.rootPage = HomePage;
unsubscribe();
} else {
this.rootPage = 'LoginPage';
unsubscribe();
}
});
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
statusBar.styleDefault();
splashScreen.hide();
});
}
}
Deep imports
are not supported as i mentioned in the comment above, Change
From
import {Input} from '@angular/core/src/metadata/directives';
To
import {Input} from '@angular/core';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With