3
  • Ionic Framework: 3.4.2
  • Ionic Native: ^2.9.0
  • Ionic App Scripts: 2.1.3
  • Angular Core: 4.1.3
  • Angular Compiler CLI: 4.1.3
  • Node: 6.11.0
  • OS Platform: Windows 10
  • Navigator Platform: Win32
  • User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36

everything was working just fine until i install ionic-native, every time i make a change it shows me this error.

Runtime Error Cannot read property 'call' of undefined

so i need to re-run ionic serve everytime i make a change

2 Answers 2

3

In my experience, this error is usually the result of running multiple "ionic server" on the same machine. Double check you're not running in another terminal window.

0

You will have to see for which function call you are getting error. As per the error, the Function you are trying to call is undefined hence you can't call "call" method on it.

e.g. myFun.call(myCtx, arg1, arg2,...); in your case myFun is undefined

3
  • it tells me that the function is in main.ts, but there is no function called call in this file
    – bondif
    Aug 16, 2017 at 13:11
  • "call" is an api available on function, function name must be something else. try searching for ".call" in your main.ts and put break point on each of this method call to see where the actual error is.
    – Nemani
    Aug 17, 2017 at 5:10
  • FWIW, this presented for me in a very similar manner to the OP - after the first change. I traced it to vendor.js: ``` function webpack_require__(moduleId) { ... modules[moduleId].call(module.exports, module, module.exports, _webpack_require); ... ``` Called by: ``` var WEBPACK_IMPORTED_MODULE_1_ionic_native_native_storage = __webpack_require__(203); ``` This problem presented intermittently for me - I could recover from it by making another change. Typically this means the order of some tasks runs a different order due to timing (non sequential order tasks). HTH
    – ryanm
    May 3, 2018 at 21:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.