Cannot find module @ionicnative/network


#1

This is my Package.json

"dependencies": {
        "@angular/common": "5.0.0",
        "@angular/compiler": "5.0.0",
        "@angular/compiler-cli": "5.0.0",
        "@angular/core": "5.0.0",
        "@angular/forms": "5.0.0",
        "@angular/http": "5.0.0",
        "@angular/platform-browser": "5.0.0",
        "@angular/platform-browser-dynamic": "5.0.0",
        "@ionic-native/call-number": "^4.5.2",
        "@ionic-native/core": "4.3.2",
        "@ionic-native/geolocation": "^4.7.0",
        "@ionic-native/native-geocoder": "^4.7.0",
        "@ionic-native/network": "^4.7.0",
        "@ionic-native/splash-screen": "4.3.2",
        "@ionic-native/status-bar": "4.3.2",
        "@ionic/storage": "2.1.3",
        "call-number": "^1.0.1",
        "cordova-android": "~6.3.0",
        "cordova-plugin-device": "^1.1.4",
        "cordova-plugin-geolocation": "~4.0.1",
        "cordova-plugin-ionic-webview": "^1.1.16",
        "cordova-plugin-nativegeocoder": "^3.1.1",
        "cordova-plugin-network-information": "^2.0.1",
        "cordova-plugin-splashscreen": "^4.0.3",
        "cordova-plugin-whitelist": "^1.3.1",
        "ionic-angular": "3.9.2",
        "ionic-native": "^2.9.0",
        "ionic-plugin-keyboard": "^2.2.1",
        "ionicons": "3.0.0",
        "mx.ferreyra.callnumber": "~0.0.2",
        "rxjs": "5.5.2",
        "sw-toolbox": "3.6.0",
        "zone.js": "0.8.18"
    },
    "devDependencies": {
        "@ionic/app-scripts": "3.1.0",
        "typescript": "2.4.2"
    },

#2

Did you placed the reference for it in app.module.ts?


#3

@mcihak yes.This is my app.module.ts

import { Network } from '@ionic-native/network';

  providers: [
    StatusBar,
    SplashScreen,
    Network,
]

#4

@mcihak Is this the issue related with my ionicnative/core version?


#5

No, I have the same version like you. Did you tried to remove node_modules folder and reinstall npm packages?


#6

@mcihak yes.I tried that.removed my node modules and reinstalled using npm install .
Still same issue.
full error code on console

Uncaught Error: Cannot find module "@ionic-native/network"
    at Object.492 (main.ts:5)
    at __webpack_require__ (bootstrap 75c59746dde4dd5dad72:54)
    at Object.487 (main.js:517)
    at __webpack_require__ (bootstrap 75c59746dde4dd5dad72:54)
    at webpackJsonpCallback (bootstrap 75c59746dde4dd5dad72:25)
    at main.js:1

#7

Strange. Try to completly remove this plugin and then install it again.


#8

okey.let me try that