cordova - How to fix " ReferenceError : ionic is not defined " when I run command ionic serve --lab -


i have created ionic project in yeoman. have selected option localhost when ionic serve command showed multiple address. when running app showing error on console

   referenceerror : ionic not defined 

and complete process following -

   running live reload server: http://localhost:35729    watching : [ 'www/**/*', '!www/lib/**/*' ]    running dev server: http://localhost:8100    ionic server commands, enter:    restart or r restart client app root    goto or g , url have app navigate given url    consolelogs or c enable/disable console log output    serverlogs or s enable/disable server log output    quit or q shutdown server , exit     ionic $ c    console log output: enabled    loading: /?restart=998712    ionic $ 0     129599   error    referenceerror: ionic not defined,       http://localhost:8100/?ionicplatform=ios, line: 103     0     129653   error    referenceerror: ionic not defined,   http://localhost:8100/?ionicplatform=android, line: 103 

i unable understand why error flashing on console. ionic installed on system ionic , have tested running using ionic command. here screenshot of error getting. have checked ionic.config file in system , server address there in following manner

  "ionicserveaddress": "localhost" 

please me fix problem.

you have solve issues in 2 ways.

  1. deleting node_modules , running npm update
  2. reinstalling gulp (but should installed global)

    npm install -g gulp


Comments