Typescript Cannot find name 'Events' , 'NavParams' , 'NavController'


#1

I am getting error ‘Ionic server’

  • Cannot find name ‘NavController’
  • Cannot find name ‘ViewController’
  • Cannot find name ‘Events’.

package.json
{
“name”: “ionic-hello-world”,
“author”: “Ionic Framework”,
“homepage”: “http://ionicframework.com/”,
“private”: true,
“scripts”: {
“clean”: “ionic-app-scripts clean”,
“build”: “ionic-app-scripts build”,
“ionic:build”: “ionic-app-scripts build”,
“ionic:serve”: “ionic-app-scripts serve”
},
“dependencies”: {
"@angular/common": “2.4.8”,
"@angular/compiler": “2.4.8”,
"@angular/compiler-cli": “2.4.8”,
"@angular/core": “2.4.8”,
"@angular/forms": “2.4.8”,
"@angular/http": “2.4.8”,
"@angular/platform-browser": “2.4.8”,
"@angular/platform-browser-dynamic": “2.4.8”,
"@angular/platform-server": “2.4.8”,
"@ionic-native/camera": “^3.4.3”,
"@ionic-native/core": “3.1.0”,
"@ionic-native/facebook": “^3.4.3”,
"@ionic-native/google-analytics": “^3.4.3”,
"@ionic-native/google-maps": “^3.4.3”,
"@ionic-native/in-app-browser": “^3.4.3”,
"@ionic-native/keyboard": “^3.4.3”,
"@ionic-native/launch-navigator": “^3.4.3”,
"@ionic-native/network": “^3.4.3”,
"@ionic-native/push": “^3.4.3”,
"@ionic-native/splash-screen": “3.1.0”,
"@ionic-native/status-bar": “3.1.0”,
"@ionic/storage": “2.0.0”,
"@types/lodash": “4.14.50”,
“angular2-text-mask”: “^7.0.0”,
“ionic-angular”: “2.3.0”,
“ionicons”: “3.0.0”,
“jquery”: “^3.2.1”,
“rxjs”: “5.0.1”,
“sw-toolbox”: “3.4.0”,
“zone.js”: “0.7.2”
},
“devDependencies”: {
"@ionic/app-scripts": “1.1.4”,
"@types/lodash": “ts2.0”,
“typescript”: “2.0.9”
},
“cordovaPlugins”: [
“cordova-plugin-whitelist”,
“cordova-plugin-console”,
“cordova-plugin-statusbar”,
“cordova-plugin-device”,
“cordova-plugin-splashscreen”,
“ionic-plugin-keyboard”
],
“cordovaPlatforms”: [
“ios”,
{
“platform”: “ios”,
“version”: “”,
“locator”: “ios”
}
],
“description”: “v7Transfer: An Ionic project”
}

tsconfig.json
{
“compilerOptions”: {
“baseUrl”: “”,
“allowSyntheticDefaultImports”: true,
“declaration”: false,
“emitDecoratorMetadata”: true,
“experimentalDecorators”: true,
“allowJs”: true,
“lib”: [
“dom”,
“es2015”
],
“module”: “es2015”,
“moduleResolution”: “node”,
“sourceMap”: true,
“target”: “es5”
},
“include”: [
“src/**/*.ts”
],
“exclude”: [
“node_modules”
],
“compileOnSave”: false,
“atom”: {
“rewriteTsconfig”: false
}
}


#2

You probably tried to use these types without importing them. Any reasonable IDE should flag this for you.


#3

I am using vscode and it gives this error;

[ts] Experimental support for decorators is a feature that is subject to change in a future release. Set the ‘experimentalDecorators’ option to remove this warning.


#4

That doesn’t seem related. The build process should be telling you which file is causing the problem.


#5

It gives this error for all files;
ERROR

ionic build


Dependency warning - for the CLI to run correctly,
it is highly recommended to install/upgrade the following:

Install ios-deploy to deploy iOS applications to devices. npm install -g ios-deploy (may require sudo)


ionic-hello-world@ ionic:build /Users/erdemildiz/Desktop/McDonalds_Turkiye_App
ionic-app-scripts build

[00:33:17] ionic-app-scripts 1.1.4
[00:33:17] build dev started …
[00:33:17] clean started …
[00:33:17] clean finished in 4 ms
[00:33:17] copy started …
[00:33:17] transpile started …
[00:33:29] typescript: node_modules/@ionic-native/camera/index.d.ts, line: 1
Module ‘"/Users/erdemildiz/Desktop/McDonalds_Turkiye_App/node_modules/@ionic-native/core/index"’ has no
exported member ‘IonicNativePlugin’.

   L1:  import { IonicNativePlugin } from '@ionic-native/core';

[00:33:29] typescript: node_modules/@ionic-native/facebook/index.d.ts, line: 1
[00:33:29] typescript: node_modules/@ionic-native/google-analytics/index.d.ts, line: 1
L2: export interface CameraOptions {

        Module '"/Users/erdemildiz/Desktop/McDonalds_Turkiye_App/node_modules/@ionic-native/core/index"' has no
        exported member 'IonicNativePlugin'.

   L1:  import { IonicNativePlugin } from '@ionic-native/core';
   L2:  export interface FacebookLoginResponse {

        Module '"/Users/erdemildiz/Desktop/McDonalds_Turkiye_App/node_modules/@ionic-native/core/index"' has no
        exported member 'IonicNativePlugin'.

[00:33:29] typescript: node_modules/@ionic-native/google-maps/index.d.ts, line: 1
[00:33:29] typescript: node_modules/@ionic-native/in-app-browser/index.d.ts, line: 1
[00:33:29] L1: import { IonicNativePlugin } from ‘@ionic-native/core’;

        Module '"/Users/erdemildiz/Desktop/McDonalds_Turkiye_App/node_modules/@ionic-native/core/index"' has no
        exported member 'IonicNativePlugin'.

   L1:  import { IonicNativePlugin } from '@ionic-native/core';
   L2:  import { Observable } from 'rxjs/Observable';

        Module '"/Users/erdemildiz/Desktop/McDonalds_Turkiye_App/node_modules/@ionic-native/core/index"' has no
        exported member 'IonicNativePlugin'.

   L1:  import { IonicNativePlugin } from '@ionic-native/core';
   L2:  import { Observable } from 'rxjs/Observable';

typescript: node_modules/@ionic-native/keyboard/index.d.ts, line: 1
Module ‘"/Users/erdemildiz/Desktop/McDonalds_Turkiye_App/node_modules/@ionic-native/core/index"’ has no
exported member ‘IonicNativePlugin’.

[00:33:29] typescript: node_modules/@ionic-native/launch-navigator/index.d.ts, line: 1
[00:33:29] typescript: node_modules/@ionic-native/network/index.d.ts, line: 1
L1: import { IonicNativePlugin } from ‘@ionic-native/core’;
L2: import { Observable } from ‘rxjs/Observable’;

        Module '"/Users/erdemildiz/Desktop/McDonalds_Turkiye_App/node_modules/@ionic-native/core/index"' has no
        exported member 'IonicNativePlugin'.

   L1:  import { IonicNativePlugin } from '@ionic-native/core';
   L2:  export interface LaunchNavigatorOptions {

[00:33:29] typescript: node_modules/@ionic-native/push/index.d.ts, line: 1
[00:33:29] typescript: src/app/app.component.ts, line: 17
Module ‘"/Users/erdemildiz/Desktop/McDonalds_Turkiye_App/node_modules/@ionic-native/core/index"’ has no
exported member ‘IonicNativePlugin’.

   L1:  import { IonicNativePlugin } from '@ionic-native/core';
   L2:  import { Observable } from 'rxjs/Observable';

        Module '"/Users/erdemildiz/Desktop/McDonalds_Turkiye_App/node_modules/@ionic-native/core/index"' has no
        exported member 'IonicNativePlugin'.

   L1:  import { IonicNativePlugin } from '@ionic-native/core';
   L2:  import { Observable } from 'rxjs/Observable';

[00:33:29] typescript: src/app/app.component.ts, line: 30
[00:33:29] typescript: src/app/app.component.ts, line: 33
Cannot find name ‘Nav’.

  L16:  export class MyApp {
  L17:    @ViewChild(Nav) nav: Nav;

        Cannot find name 'Platform'.

  L30:    constructor(public platform: Platform,
  L31:      private server: Server,

        Cannot find name 'Events'.

[00:33:29] typescript: src/pages/BasketPage/basket_page.ts, line: 29
L32: private progressInfo: ProgressInfo,
L33: public event: Events,
L34: private push: Push,

        Cannot find name 'NavController'.

  L28:  constructor(private server: Server,
  L29:              private navCtrl: NavController,
  L30:              private event: Events,

[00:33:29] typescript: src/pages/BasketPage/basket_page.ts, line: 30
[00:33:29] typescript: src/pages/BasketPage/basket_page.ts, line: 32
[00:33:29] typescript: src/pages/FavoriOrderPage/favori_order_page.ts, line: 22

        Cannot find name 'Events'.

  L29:  private navCtrl: NavController,
  L30:  private event: Events,
  L31:  private helper: Helper,

        Cannot find name 'ViewController'.

  L31:  private helper: Helper,
  L32:  private viewCtrl: ViewController,
  L33:  private ga: GoogleAnalytics,

        Cannot find name 'NavController'.

[00:33:29] typescript: src/pages/LastOrderPage/last_order_page.ts, line: 23
[00:33:29] typescript: src/pages/LiveSupportPage/live_support_page.ts, line: 10
[00:33:29] typescript: src/pages/LoginPage/EmailLoginPage/email_login_page.ts, line: 25

  L22:    constructor(public navCtrl: NavController,
  L23:                private progressInfo: ProgressInfo,

        Cannot find name 'NavController'.

  L23:    constructor(public navCtrl: NavController,
  L24:      private server: Server,

        Cannot find name 'NavController'.

  L10:    constructor(public navCtrl: NavController) {}

        Cannot find name 'NavController'.

  L25:    constructor(private navCtrl: NavController,
  L26:      private viewCtrl: ViewController,

[00:33:29] typescript: src/pages/LoginPage/EmailLoginPage/email_login_page.ts, line: 26
Cannot find name ‘ViewController’.
[00:33:29] typescript: src/pages/LoginPage/EmailLoginPage/email_login_page.ts, line: 27
[00:33:29] typescript: src/pages/LoginPage/EmailLoginPage/email_login_page.ts, line: 29

  L25:  constructor(private navCtrl: NavController,
  L26:    private viewCtrl: ViewController,
  L27:    private modalCrtl: ModalController,

        Cannot find name 'ModalController'.

  L26:  private viewCtrl: ViewController,
  L27:  private modalCrtl: ModalController,
  L28:  private server: Server,

        Cannot find name 'Events'.

  L28:  private server: Server,

[00:33:29] typescript: src/pages/LoginPage/EmailLoginPage/email_login_page.ts, line: 109
L29: public event: Events,
L30: private ga: GoogleAnalytics,

        Cannot find name 'ViewController'.

[00:33:29] typescript: src/pages/LoginPage/EmailLoginPage/email_login_page.ts, line: 121
[00:33:29] typescript: src/pages/LoginPage/RememberPage/remember_page.ts, line: 25
L108: export class TermOfUse {
L109: constructor(private viewCtrl: ViewController) { }

        Cannot find name 'ViewController'.

 L120:  export class TermOfPrivacy {
 L121:    constructor(private viewCtrl: ViewController) { }

        Cannot find name 'NavController'.

  L24:                private ga: GoogleAnalytics,
  L25:                private navCtrl: NavCont[00:33:29]  typescript: src/pages/LoginPage/login_page.ts, line: 30

mroller) {

[00:33:29] typescript: src/pages/LoginPage/login_page.ts, line: 31
[00:33:29] typescript: src/pages/LoginPage/login_page.ts, line: 34
Cannot find name ‘ModalController’.

  L30:    constructor(public modalCtrl: ModalController,
  L31:      private navCtrl: NavController,

        Cannot find name 'NavController'.

  L30:  constructor(public modalCtrl: ModalController,
  L31:    private navCtrl: NavController,
  L32:    private progressInfo: ProgressInfo,

[00:33:29] typescript: src/pages/MainPage/main_page.ts, line: 28
Cannot find name ‘Events’.

  L33:  private server: Server,
  L34:  public event: Events,
  L35:  private fb: Facebook,

        Cannot find name 'Content'.

[00:33:29] typescript: src/pages/MainPage/main_page.ts, line: 59
[00:33:29] typescript: src/pages/MainPage/main_page.ts, line: 62
[00:33:29] typescript: src/pages/MainPage/main_page.ts, line: 63
[00:33:29] typescript: src/pages/MainPage/main_page.ts, line: 64
L28: @ViewChild(Content) content: Content;

        Cannot find name 'ViewController'.

  L59:    constructor(public viewCtrl: ViewController,
  L60:      private server: Server,

        Cannot find name 'NavController'.

  L61:  private progressInfo: ProgressInfo,
  L62:  private navCtrl: NavController,
  L63:  private event: Events,

        Cannot find name 'Events'.

  L62:  private navCtrl: NavController,
  L63:  private event: Events,
  L64:  private modalCtrl: ModalController,

        Cannot find name 'ModalController'.

[00:33:29] typescript: src/pages/MainPage/main_page.ts, line: 65
[00:33:29] typescript: src/pages/MainPage/main_page.ts, line: 69
[00:33:29] typescript: src/pages/MainPage/main_page.ts, line: 361
L63: private event: Events,
L64: private modalCtrl: ModalController,
L65: private param: NavParams,

        Cannot find name 'NavParams'.

  L64:  private modalCtrl: ModalController,
  L65:  private param: NavParams,
  L66:  private helper: Helper,

        Cannot find name 'Platform'.

  L68:  private network: Network,
  L69:  private platform: Platform) {
  L70:     this.baseUrl = this.server.options.BaseUrl;

[00:33:29] typescript: src/pages/MainPage/main_page.ts, line: 361
Cannot find name ‘NavParams’.

 L361:    constructor(private param: NavParams, private viewCtrl: ViewController, public renderer: Renderer) {
 L362:      this.image = this.param.get('image');

        Cannot find name 'ViewController'.

 L361:    constructor(private param: NavParams, private viewCtrl: ViewController, public renderer: Renderer) {

[00:33:29] typescript: src/pages/OrderPage/OrderDetail/order_detail.ts, line: 19
[00:33:29] typescript: src/pages/OrderPage/OrderDetail/order_detail.ts, line: 20
[00:33:29] typescript: src/pages/OrderPage/order_page.ts, line: 23
L362: this.image = this.param.get(‘image’);

        Cannot find name 'NavParams'.

  L19:    constructor(private param: NavParams,
  L20:      private navCtrl: NavController,

        Cannot find name 'NavController'.

  L19:  constructor(private param: NavParams,
  L20:    private navCtrl: NavController,
  L21:    private server: Server,

        Cannot find name 'Content'.

[00:33:29] typescript: src/pages/OrderPage/order_page.ts, line: 25
[00:33:29] typescript: src/pages/OrderPage/order_page.ts, line: 62
[00:33:29] typescript: src/pages/OrderPage/order_page.ts, line: 63
L23: @ViewChild(Content) content: Content;
L24: @ViewChild(‘promo’) scrollElement: ElementRef;

        Cannot find name 'Tabs'.

  L24:    @ViewChild('promo') scrollElement: ElementRef;
  L25:    tab: Tabs;

        Cannot find name 'NavController'.

  L62:    constructor(public navCtrl: NavController,
  L63:      private navParams: NavParams,

        Cannot find name 'NavParams'.

  L62:  constructor(public navCtrl: NavController,
  L63:    private navParams: NavParams,

[00:33:29] typescript: src/pages/OrderPage/order_page.ts, line: 65
[00:33:29] typescript: src/pages/OrderPage/order_page.ts, line: 66
[00:33:29] typescript: src/pages/OrderPage/order_page.ts, line: 706
L64: private progressInfo: ProgressInfo,

        Cannot find name 'ModalController'.

  L64:  private progressInfo: ProgressInfo,
  L65:  private modalCtrl: ModalController,
  L66:  private event: Events,

        Cannot find name 'Events'.

  L65:  private modalCtrl: ModalController,
  L66:  private event: Events,

[00:33:29] typescript: src/pages/Payment/Summery/summery.ts, line: 25
L67: private ga: GoogleAnalytics,

        Cannot find name 'NavParams'.

 L706:    constructor(private param: NavParams,
 L707:                private server: Server,

        Cannot find name 'ViewController'.

  L25:    constructor(public viewCtrl: ViewController,

[00:33:29] typescript: src/pages/Payment/Summery/summery.ts, line: 29
[00:33:29] typescript: src/pages/Payment/Summery/summery.ts, line: 31
L26: private server: Server,

        Cannot find name 'NavController'.

  L28:  private progressInfo: ProgressInfo,
  L29:  private navCtrl: NavController,
  L30:  private ga: GoogleAnalytics,

        Cannot find name 'NavParams'.

  L30:         private ga: GoogleAnalytics,

[00:33:29] typescript: src/pages/Payment/payment.ts, line: 41
[00:33:29] typescript: src/pages/Payment/payment.ts, line: 43
[00:33:29] typescript: src/pages/Payment/payment.ts, line: 45
L31: private param: NavParams) {
L32: // Get sale id from param

        Cannot find name 'NavController'.

  L40:  public _browser: InAppBrowser,
  L41:  private navCtrl: NavController,
  L42:  private ga: GoogleAnalytics,

        Cannot find name 'ModalController'.

  L42:  private ga: GoogleAnalytics,
  L43:  private modalCtrl: ModalController,
  L44:  private formBuilder: FormBuilder,

[00:33:29] typescript: src/pages/ProductListPage/product_list_page.ts, line: 21
[00:33:29] typescript: src/pages/ProductListPage/product_list_page.ts, line: 23
Cannot find name ‘NavParams’.

  L44:        private formBuilder: FormBuilder,
  L45:        private param: NavParams) {
  L46:  super();

        Cannot find name 'NavParams'.

  L20:  constructor(private server: Server,
  L21:    private params: NavParams,
  L22:    private ga: GoogleAnalytics,

        Cannot find name 'NavController'.

[00:33:29] typescript: src/pages/ProductPage/product_page.ts, line: 24
[00:33:29] typescript: src/pages/ProfilePage/AddAddressPage/add_address_page.ts, line: 14

  L22:  private ga: GoogleAnalytics,
  L23:  private navCtrl: NavController,
  L24:  private progressInfo: ProgressInfo) { }

        Cannot find name 'NavController'.

  L23:  constructor(private server: Server,
  L24:              private navCtrl: NavController,
  L25:              private ga: GoogleAnalytics,

[00:33:29] typescript: src/pages/ProfilePage/AddAddressPage/add_address_page.ts, line: 42
[00:33:29] typescript: src/pages/ProfilePage/AddAddressPage/add_address_page.ts, line: 43
Cannot find name ‘Content’.

  L13:  export class AddAddressPage implements OnInit {
  L14:    @ViewChild(Content) content: Content;

        Cannot find name 'NavController'.

  L42:    constructor(private navCtrl: NavController,
  L43:      private viewCtrl: ViewController,

        Cannot find name 'ViewController'.

  L42:  constructor(private navCtrl: NavController,

[00:33:29] typescript: src/pages/ProfilePage/AddAddressPage/add_address_page.ts, line: 44
[00:33:29] typescript: src/pages/ProfilePage/AddAddressPage/add_address_page.ts, line: 46
L43: private viewCtrl: ViewController,
L44: private modalCrtl: ModalController,

        Cannot find name 'ModalController'.

  L43:  private viewCtrl: ViewController,
  L44:  private modalCrtl: ModalController,
  L45:  private server: Server,

        Cannot find name 'NavParams'.

[00:33:29] typescript: src/pages/ProfilePage/AddAddressPage/add_address_page.ts, line: 48
[00:33:29] typescript: src/pages/ProfilePage/AddressPage/address_page.ts, line: 21
[00:33:29] typescript: src/pages/ProfilePage/AddressPage/address_page.ts, line: 22
L45: private server: Server,
L46: private param: NavParams,
L47: private formBuilder: FormBuilder,

        Cannot find name 'Events'.

  L47:  private formBuilder: FormBuilder,
  L48:  private event: Events,
  L49:  private ga: GoogleAnalytics,

        Cannot find name 'NavController'.

  L21:    constructor(private navCtrl: NavController,
  L22:      private viewCtrl: ViewController,

        Cannot find name 'ViewController'.

  L21:  constructor(private navCtrl: NavController,
  L22:    private viewCtrl: ViewController,

[00:33:29] typescript: src/pages/ProfilePage/AddressPage/address_page.ts, line: 24
[00:33:29] typescript: src/pages/ProfilePage/ChangePasswordPage/change_password_page.ts, line: 21
[00:33:29] typescript: src/pages/ProfilePage/ChangePasswordPage/change_password_page.ts, line: 22
L23: private server: Server,

        Cannot find name 'Events'.

  L23:  private server: Server,
  L24:  private event: Events,
  L25:  private ga: GoogleAnalytics,

        Cannot find name 'NavController'.

  L21:    constructor(private navCtrl: NavController,
  L22:      private viewCtrl: ViewController,

        Cannot find name 'ViewController'.

  L21:  constructor(private navCtrl: NavController,

[00:33:29] typescript: src/pages/ProfilePage/ChangePasswordPage/change_password_page.ts, line: 23
[00:33:29] typescript: src/pages/ProfilePage/CreditCardPage/credit_card_page.ts, line: 19
[00:33:29] typescript: src/pages/ProfilePage/CreditCardPage/credit_card_page.ts, line: 47
L22: private viewCtrl: ViewController,
L23: private modalCrtl: ModalController,

        Cannot find name 'ModalController'.

  L22:  private viewCtrl: ViewController,
  L23:  private modalCrtl: ModalController,
  L24:  private server: Server,

        Cannot find name 'Content'.

  L18:  export class CreditCardPage extends MasterPassBkm  implements OnInit {
  L19:    @ViewChild(Content) content: Content;

[00:33:29] typescript: src/pages/ProfilePage/CreditCardPage/credit_card_page.ts, line: 50
[00:33:29] typescript: src/pages/ProfilePage/CreditCardPage/credit_card_page.ts, line: 122
[00:33:29] typescript: src/pages/ProfilePage/EditProfilePage/edit_profile_page.ts, line: 37
Cannot find name ‘ModalController’.

  L46:  constructor(private formBuilder: FormBuilder,
  L47:              private modalCtrl: ModalController,
  L48:              public _server: Server,

        Cannot find name 'Platform'.

  L49:  public _progressInfo: ProgressInfo,
  L50:  private platform: Platform,
  L51:  public _registerHandler: RegisterHandler,

        Cannot find name 'ViewController'.

 L122:    constructor(private viewCtrl: ViewController) { }

        Cannot find name 'NavController'.

[00:33:29] typescript: src/pages/ProfilePage/EditProfilePage/edit_profile_page.ts, line: 38
[00:33:29] typescript: src/pages/ProfilePage/EditProfilePage/edit_profile_page.ts, line: 40
[00:33:29] typescript: src/pages/ProfilePage/profile_page.ts, line: 26
[00:33:29] typescript: src/pages/ProfilePage/profile_page.ts, line: 27
L37: constructor(private navCtrl: NavController,
L38: private viewCtrl: ViewController,

        Cannot find name 'ViewController'.

  L37:  constructor(private navCtrl: NavController,
  L38:    private viewCtrl: ViewController,
  L39:    private server: Server,

        Cannot find name 'Events'.

  L39:  private server: Server,
  L40:  private event: Events,
  L41:  private camera: Camera,

        Cannot find name 'NavController'.

  L26:    constructor(public navCtrl: NavController,
  L27:                private viewCtrl: ViewController,

[00:33:29] typescript: src/pages/ProfilePage/profile_page.ts, line: 29
[00:33:29] typescript: src/pages/ProfilePage/profile_page.ts, line: 30
[00:33:29] typescript: src/pages/Purchase/PaymentType/payment_type.ts, line: 23
Cannot find name ‘ViewController’.

  L26:  constructor(public navCtrl: NavController,
  L27:              private viewCtrl: ViewController,
  L28:              private progressInfo: ProgressInfo,

        Cannot find name 'Events'.

  L28:  private progressInfo: ProgressInfo,
  L29:  private event: Events,
  L30:  public platform: Platform,

        Cannot find name 'Platform'.

  L29:  private event: Events,
  L30:  public platform: Platf[00:33:29]  typescript: src/pages/Purchase/PaymentType/payment_type.ts, line: 25

[49morm,
L31: private helper: Helper,

        Cannot find name 'NavController'.

[00:33:29] typescript: src/pages/Purchase/Score/score.ts, line: 26
[00:33:29] typescript: src/pages/Purchase/Score/score.ts, line: 27
[00:33:29] typescript: src/pages/Purchase/purchase.ts, line: 48
L23: constructor(public navCtrl: NavController,
L24: private server: Server,

        Cannot find name 'NavParams'.

  L24:  private server: Server,
  L25:  private param: NavParams,
  L26:  private progressInfo: ProgressInfo) {

        Cannot find name 'NavController'.

  L26:    constructor(public navCtrl: NavController,
  L27:                private param: NavParams,

        Cannot find name 'NavParams'.

  L26:  constructor(public navCtrl: NavController,
  L27:              private param: NavParams,
  L28:              private server: Server,

        Cannot find name 'NavController'.

[00:33:29] typescript: src/pages/Purchase/purchase.ts, line: 49
[00:33:29] typescript: src/pages/Purchase/purchase.ts, line: 53

  L48:    constructor(public navCtrl: NavController,
  L49:                private param: NavParams,

        Cannot find name 'NavParams'.

  L48:  constructor(public navCtrl: NavController,
  L49:              private param: NavParams,
  L50:              private server: Server,

[00:33:29] typescript: src/pages/Purchase/purchase.ts, line: 55
[00:33:29] typescript: src/pages/Purchase/purchase.ts, line: 57
[00:33:29] typescript: src/pages/RestaurantDetailPage/restaurant_detail_page.ts, line: 31
Cannot find name ‘ViewController’.

  L52:  private progressInfo: ProgressInfo,
  L53:  private viewCtrl: ViewController,
  L54:  private browser: InAppBrowser,

        Cannot find name 'Platform'.

  L54:  private browser: InAppBrowser,
  L55:  private platform: Platform,
  L56:  private ga: GoogleAnalytics,

        Cannot find name 'Events'.

  L56:          private ga: GoogleAnalytics,
  L57:          private event: Events) {
  L58:  this.masterPassBkm._server = this.server;

[00:33:29] typescript: src/pages/RestaurantLocationPage/restaurant_location_page.ts, line: 36
[00:33:29] typescript: src/pages/RestaurantLocationPage/restaurant_location_page.ts, line: 37
[00:33:29] typescript: src/pages/RestaurantLocationPage/restaurant_location_page.ts, line: 40
Cannot find name ‘NavParams’.

  L31:    constructor(public param: NavParams,
  L32:      private progressInfo: ProgressInfo,

        Cannot find name 'NavController'.

  L36:    constructor(public navCtrl: NavController,
  L37:      public platform: Platform,

        Cannot find name 'Platform'.

[00:33:29] typescript: src/pages/RestaurantLocationPage/restaurant_location_page.ts, line: 269
[00:33:29] typescript: src/pages/RestaurantLocationPage/restaurant_location_page.ts, line: 269
[00:33:29] typescript: src/pages/TabsPage/tabs_page.ts, line: 28
L36: constructor(public navCtrl: NavController,
L37: public platform: Platform,
L38: private server: Server,

        Cannot find name 'ModalController'.

  L39:  private progressInfo: ProgressInfo,
  L40:  private modalCtrl: ModalController,
  L41:  private ga: GoogleAnalytics,

        Cannot find name 'ViewController'.

 L268:    ];
 L269:    constructor(private viewCtrl: ViewController, private param: NavParams) { }

        Cannot find name 'NavParams'.

 L268:    ];
 L269:    constructor(private viewCtrl: ViewController, private param: NavParams) { }

[00:33:29] typescript: src/pages/TabsPage/tabs_page.ts, line: 30
[00:33:29] typescript: src/pages/TabsPage/tabs_page.ts, line: 31
[00:33:29] typescript: src/pages/Wifi/wifi.ts, line: 28
[00:33:29] typescript: src/pages/Wifi/wifi.ts, line: 30
[00:33:29] typescript: src/pages/Wifi/wifi.ts, line: 31
[00:33:29] typescript: src/pages/Wifi/wifi.ts, line: 34
[00:33:29] typescript: src/pages/Wifi/wifi.ts, line: 152
[00:33:29] typescript: src/pages/Wifi/wifi.ts, line: 180
[00:33:29] typescript: src/providers/Helper.ts, line: 17
[00:33:29] typescript: src/providers/ProgressInfo.ts, line: 11
Cannot find name ‘NavController’.

  L28:   constructor(public navCtrl: NavController,
  L29:               private server: Server,

        Cannot find name 'Events'.

  L29:  private server: Server,
  L30:  private event: Events,
  L31:  private platform: Platform,

        Cannot find name 'Platform'.

  L30:  private event: Events,
  L31:  private platform: Platform,
  L32:  private keyboard: Keyboard) {}

        Cannot find name 'ViewController'.

  L28:    constructor(private viewCtrl: ViewCo[00:33:29]  typescript: src/providers/ProgressInfo.ts, line: 11

49mntroller,
L29: private progressInfo: ProgressInfo,

        Cannot find name 'Events'.

  L29:  private progressInfo: ProgressInfo,
  L30:  private event: Events,
  L31:  private navCtrl: NavController,

        Cannot find name 'NavController'.

  L30:  private event: Events,
  L31:  private navCtrl: NavController,
  L32:  private formBuilder: FormBuilder,

        Cannot find name 'ModalController'.

  L33:                private server: Server,
  L34:                private modalCtrl: ModalController) {

        Cannot find name 'Events'.

 L151:  constructor(private formBuilder: FormBuilder,
 L152:              private event: Events){
 L153:    this.rememberPasswordForm = this.formBuilder.group({

        Cannot find name 'ViewController'.

 L180:      constructor(private viewCtrl: ViewController){}

        Cannot find name 'Events'.

  L16:  private _progressInfo: ProgressInfo,
  L17:  private _event: Events,
  L18:  private _fb: Facebook,

        Cannot find name 'AlertController'.

  L11:    constructor(private alertCtrl: AlertController, private loadingCtrl: LoadingController) { }

        Cannot find name 'LoadingController'.

  L11:    constructor(private alertCtrl: AlertController, private loadingCtrl: LoadingController) { }

[00:33:29] transpile failed
[00:33:29] ionic-app-script task: “build”
[00:33:29] Error: Error

npm ERR! Darwin 16.5.0
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “run” “ionic:build” "–"
npm ERR! node v7.10.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ionic-hello-world@ ionic:build: ionic-app-scripts build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-hello-world@ ionic:build script ‘ionic-app-scripts build’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ionic-hello-world
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:


#6

As I said earlier, all of those “Cannot find name” errors are likely due to failure to import these types. The ones about IonicNativePlugin are because you have some ionic-native plugins >=3.6.0, but your version of @ionic-native/core is older than 3.6.0. Upgrade @ionic-native/core to fix those.


#7

Thanks @rapropos Its work; I update my project.json;

{
“name”: “ionic-hello-world”,
“author”: “Ionic Framework”,
“homepage”: “http://ionicframework.com/”,
“private”: true,
“scripts”: {
“clean”: “ionic-app-scripts clean”,
“build”: “ionic-app-scripts build”,
“ionic:build”: “ionic-app-scripts build”,
“ionic:serve”: “ionic-app-scripts serve”
},
“dependencies”: {
"@angular/common": “4.1.0”,
"@angular/compiler": “4.1.0”,
"@angular/compiler-cli": “4.1.0”,
"@angular/core": “4.1.0”,
"@angular/forms": “4.1.0”,
"@angular/http": “4.1.0”,
"@angular/platform-browser": “4.1.0”,
"@angular/platform-browser-dynamic": “4.1.0”,
"@angular/platform-server": “2.4.8”,
"@ionic-native/camera": “^3.4.3”,
"@ionic-native/core": “3.6.1”,
"@ionic-native/facebook": “^3.4.3”,
"@ionic-native/google-analytics": “^3.4.3”,
"@ionic-native/google-maps": “^3.4.3”,
"@ionic-native/in-app-browser": “^3.4.3”,
"@ionic-native/keyboard": “^3.4.3”,
"@ionic-native/launch-navigator": “^3.4.3”,
"@ionic-native/network": “^3.4.3”,
"@ionic-native/push": “^3.4.3”,
"@ionic-native/splash-screen": “3.1.0”,
"@ionic-native/status-bar": “3.1.0”,
"@ionic/storage": “2.0.0”,
"@types/lodash": “4.14.50”,
“angular2-text-mask”: “^7.0.0”,
“ionic-angular”: “3.2.0”,
“ionicons”: “3.0.0”,
“jquery”: “^3.2.1”,
“rxjs”: “5.1.1”,
“sw-toolbox”: “3.6.0”,
“zone.js”: “0.8.10”
},
“devDependencies”: {
"@ionic/app-scripts": “1.3.7”,
"@types/lodash": “ts2.0”,
“typescript”: “2.2.1”
},
“cordovaPlugins”: [
“cordova-plugin-whitelist”,
“cordova-plugin-console”,
“cordova-plugin-statusbar”,
“cordova-plugin-device”,
“cordova-plugin-splashscreen”,
“ionic-plugin-keyboard”
],
“cordovaPlatforms”: [
“ios”,
{
“platform”: “ios”,
“version”: “”,
“locator”: “ios”
}
],
“description”: “v7Transfer: An Ionic project”
}


#8

Please edit your post and use the </> button above the post input field to format your code or error message or wrap it in ``` (“code fences”) manually. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.