Build failed ionic 2

Hello,

I have an Ionic 2 app and it was working well, but a while ago I installed insomnia plugin and now I can’t build the production version!

If I do:
$ionic run android or $ionic run android --consolelogs --livereload, it works well and Insomia works fine.

But, now when I do:

$ionic build android --prod --release 

I get:

build prod failed: Cannot read property 'Plugin' of undefined, resolving symbol Insomnia in /media/....blabla.../node_modules/@ionic-native/insomnia/index.d.ts 

I followed the steps of the official documentation. (insomnia plugin)

Thank’s so much in advance!!!

EDIT:

When I installed the Insomnia plugin I had this but I did not give importance because I got it previous times:

├── @ionic-native/insomnia@3.4.4 
└── UNMET PEER DEPENDENCY rxjs@5.0.1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN @angular/core@2.2.1 requires a peer of rxjs@5.0.0-beta.12 but none was installed.
npm WARN @angular/http@2.2.1 requires a peer of rxjs@5.0.0-beta.12 but none was installed.
npm WARN ionic-angular@2.1.0 requires a peer of rxjs@5.0.0-beta.12 but none was installed.

packaje.json:

{
  "name": "ionic-hello-world",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/common": "2.2.1",
    "@angular/compiler": "2.2.1",
    "@angular/compiler-cli": "2.2.1",
    "@angular/core": "2.2.1",
    "@angular/forms": "2.2.1",
    "@angular/http": "2.2.1",
    "@angular/platform-browser": "2.2.1",
    "@angular/platform-browser-dynamic": "2.2.1",
    "@angular/platform-server": "2.2.1",
    "@ionic-native/core": "^3.4.4",
    "@ionic-native/insomnia": "^3.4.4",
    "@ionic/storage": "1.1.7",
    "angular2-fullcalendar": "^1.1.1",
    "angularfire2": "^2.0.0-beta.6-preview",
    "firebase": "^3.6.4",
    "ionic-angular": "^2.1.0",
    "ionic-native": "^2.5.1",
    "ionicons": "3.0.0",
    "jquery-ui": "^1.12.1",
    "rxjs": "^5.0.1",
    "soundcloud": "^3.1.2",
    "zone.js": "0.6.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "1.1.3",
    "typescript": "2.0.9"
  },
  "cordovaPlugins": [
    "cordova-plugin-whitelist",
    "cordova-plugin-statusbar",
    "cordova-plugin-console",
    "cordova-plugin-device",
    "cordova-plugin-splashscreen",
    "ionic-plugin-keyboard"
  ],
  "cordovaPlatforms": [],
  "description": "Mindfulness: An Ionic project"
}

config.xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="com.ionicframework.mindfulness924927" version="0.0.55" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
  <name>Visión Clara</name>
  <description>An awesome Ionic/Cordova app.</description>
  <author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
  <content src="index.html"/>
  <access origin="*"/>
  <allow-intent href="http://*/*"/>
  <allow-intent href="https://*/*"/>
  <allow-intent href="tel:*"/>
  <allow-intent href="sms:*"/>
  <allow-intent href="mailto:*"/>
  <allow-intent href="geo:*"/>
  <platform name="android">
    <allow-intent href="market:*"/>
    <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png"/>
    <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png"/>
    <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png"/>
    <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png"/>
    <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png"/>
    <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png"/>
    <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png"/>
    <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png"/>
    <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png"/>
    <splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png"/>
    <splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png"/>
    <splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png"/>
    <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png"/>
    <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png"/>
    <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png"/>
    <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png"/>
    <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png"/>
    <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png"/>
  </platform>
  <platform name="ios">
    <allow-intent href="itms:*"/>
    <allow-intent href="itms-apps:*"/>
  </platform>
  <preference name="webviewbounce" value="false"/>
  <preference name="UIWebViewBounce" value="false"/>
  <preference name="DisallowOverscroll" value="true"/>
  <preference name="android-minSdkVersion" value="19"/>
  <preference name="BackupWebStorage" value="none"/>
  <preference name="SplashMaintainAspectRatio" value="true"/>
  <preference name="FadeSplashScreenDuration" value="300"/>
  <preference name="SplashScreen" value="screen"/>
  <preference name="SplashScreenDelay" value="3000"/>
  <preference name="loadUrlTimeoutValue" value="700000"/>
  <preference name="orientation" value="portrait"/>
  <feature name="StatusBar">
    <param name="ios-package" onload="true" value="CDVStatusBar"/>
  </feature>
  <allow-navigation href="http://192.168.1.10:8000"/>
  <allow-navigation href="http://192.168.0.47:8000"/>
  <allow-navigation href="http://192.168.120.57:8000"/>
  <allow-navigation href="http://192.168.120.54:8000"/>
  <allow-navigation href="http://192.168.120.60:8000"/>
  <allow-navigation href="http://192.168.120.51:8000"/>
  <allow-navigation href="http://192.168.120.53:8000"/>
  <allow-navigation href="http://192.168.120.52:8000"/>
  <allow-navigation href="http://192.168.120.55:8000"/>
  <allow-navigation href="http://192.168.120.54:8100"/>
  <allow-navigation href="http://192.168.1.10:8100"/>
  <allow-navigation href="http://192.168.43.177:8100"/>
  <allow-navigation href="http://192.168.0.47:8100"/>
  <allow-navigation href="http://192.168.120.55:8100"/>
  <allow-navigation href="http://192.168.120.50:8100"/>
  <plugin name="cordova-sqlite-storage" spec="~2.0.1"/>
  <plugin name="cordova-plugin-network-information" spec="~1.3.1"/>
  <plugin name="cordova-plugin-http" spec="~1.2.0"/>
  <plugin name="cordova-plugin-media" spec="~2.4.1"/>
  <plugin name="cordova-plugin-file" spec="~4.3.1"/>
  <icon src="resources/android/icon/drawable-xhdpi-icon.png"/>
</widget>