{"action":"created","issue":{"url":"https://api.github.com/repos/driftyco/ionic-native/issues/1311","repository_url":"https://api.github.com/repos/driftyco/ionic-native","labels_url":"https://api.github.com/repos/driftyco/ionic-native/issues/1311/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ionic-native/issues/1311/comments","events_url":"https://api.github.com/repos/driftyco/ionic-native/issues/1311/events","html_url":"https://github.com/driftyco/ionic-native/issues/1311","id":218610925,"number":1311,"title":"Build failed ionic 2","user":{"login":"jgw96","id":8823093,"avatar_url":"https://avatars0.githubusercontent.com/u/8823093?v=3","gravatar_id":"","url":"https://api.github.com/users/jgw96","html_url":"https://github.com/jgw96","followers_url":"https://api.github.com/users/jgw96/followers","following_url":"https://api.github.com/users/jgw96/following{/other_user}","gists_url":"https://api.github.com/users/jgw96/gists{/gist_id}","starred_url":"https://api.github.com/users/jgw96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgw96/subscriptions","organizations_url":"https://api.github.com/users/jgw96/orgs","repos_url":"https://api.github.com/users/jgw96/repos","events_url":"https://api.github.com/users/jgw96/events{/privacy}","received_events_url":"https://api.github.com/users/jgw96/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-03-31T20:38:06Z","updated_at":"2017-04-05T17:31:36Z","closed_at":null,"body":"_From @IvanLencina on March 31, 2017 20:16_\n\n**Ionic version:**  (check one with \"x\")\r\n[ ] **1.x**\r\n[x] **2.x**\r\n\r\n**I'm submitting a ...**  (check one with \"x\")\r\n[x] bug report\r\n[ ] feature request\r\n[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/\r\n\r\n**Current behavior:**\r\n\r\nAfter I installed [Insomnia plugin](https://ionicframework.com/docs/native/insomnia/)\r\nIf I run:\r\n`$ionic run android --consolelogs --livereload`\r\nor\r\n`$ionic serve --watch`\r\n\r\nIt works well, but when I run:\r\n`$ionic build android --prod --release`\r\n\r\nI have this error: \r\n\r\n```\r\ncan't resolve module @ionic-native/core from /media/ivan/Cosas importantes/Trabajo/AnimaEdu/animaedu-mobile/node_modules/@ionic-native/status-bar/index.d.ts\r\n[16:53:45]  build prod failed: Cannot read property 'Plugin' of undefined, resolving symbol StatusBar in \r\n            /media/ivan/Cosas \r\n            importantes/Trabajo/AnimaEdu/animaedu-mobile/node_modules/@ionic-native/status-bar/index.d.ts\r\n```\r\n\r\n**Expected behavior:**\r\n\r\n**Steps to reproduce:**\r\n\r\n1 - Installed Insomnia plugin.\r\n2 - Have error like `\"build prod failed: Cannot read property 'Plugin' of undefined, resolving symbol Insomnia\"`\r\n\r\nAt that time I had all my native plugins imported` from 'ionic-native'`.\r\n\r\n3 - Deleted 'ionic-native' from packaje.json and replaced with` \"@ionic-native/core\": \"^3.4.4\"`\r\n4 - npm i\r\n5 - Refactored my imports to the new providers version. Example:` import { InAppPurchase } from '@ionic-native/in-app-purchase';`  instead import` from 'ionic-native'`\r\n\r\n6 - Updated app-scripts in packaje.json to:    ` \"@ionic/app-scripts\": \"1.1.4\"`\r\n7 - npm i\r\n\r\n8 - Continue the same issue. I can not generate the prod build.\r\n\r\n\r\n**Related code:**\r\n\r\n**packaje.json:**\r\n\r\n```\r\n{\r\n  \"name\": \"ionic-hello-world\",\r\n  \"author\": \"Ionic Framework\",\r\n  \"homepage\": \"http://ionicframework.com/\",\r\n  \"private\": true,\r\n  \"scripts\": {\r\n    \"ionic:build\": \"ionic-app-scripts build\",\r\n    \"ionic:serve\": \"ionic-app-scripts serve\"\r\n  },\r\n  \"dependencies\": {\r\n    \"@angular/common\": \"2.2.1\",\r\n    \"@angular/compiler\": \"2.2.1\",\r\n    \"@angular/compiler-cli\": \"2.2.1\",\r\n    \"@angular/core\": \"2.2.1\",\r\n    \"@angular/forms\": \"2.2.1\",\r\n    \"@angular/http\": \"2.2.1\",\r\n    \"@angular/platform-browser\": \"2.2.1\",\r\n    \"@angular/platform-browser-dynamic\": \"2.2.1\",\r\n    \"@angular/platform-server\": \"2.2.1\",\r\n    \"@ionic-native/core\": \"^3.4.4\",\r\n    \"@ionic-native/facebook\": \"^3.4.4\",\r\n    \"@ionic-native/file\": \"^3.4.4\",\r\n    \"@ionic-native/in-app-purchase\": \"^3.4.4\",\r\n    \"@ionic-native/insomnia\": \"^3.4.4\",\r\n    \"@ionic-native/local-notifications\": \"^3.4.4\",\r\n    \"@ionic-native/media\": \"^3.4.4\",\r\n    \"@ionic-native/network\": \"^3.4.4\",\r\n    \"@ionic-native/screenshot\": \"^3.4.4\",\r\n    \"@ionic-native/social-sharing\": \"^3.4.4\",\r\n    \"@ionic-native/splash-screen\": \"^3.4.4\",\r\n    \"@ionic-native/status-bar\": \"^3.4.4\",\r\n    \"@ionic/storage\": \"1.1.7\",\r\n    \"angular2-fullcalendar\": \"^1.1.1\",\r\n    \"angularfire2\": \"^2.0.0-beta.6-preview\",\r\n    \"firebase\": \"^3.6.4\",\r\n    \"ionic-angular\": \"^2.1.0\",\r\n    \"ionicons\": \"3.0.0\",\r\n    \"jquery-ui\": \"^1.12.1\",\r\n    \"rxjs\": \"^5.0.1\",\r\n    \"soundcloud\": \"^3.1.2\",\r\n    \"zone.js\": \"0.6.26\"\r\n  },\r\n  \"devDependencies\": {\r\n    \"@ionic/app-scripts\": \"1.1.4\",\r\n    \"typescript\": \"2.0.9\"\r\n  },\r\n  \"cordovaPlugins\": [\r\n    \"cordova-plugin-whitelist\",\r\n    \"cordova-plugin-statusbar\",\r\n    \"cordova-plugin-console\",\r\n    \"cordova-plugin-device\",\r\n    \"cordova-plugin-splashscreen\",\r\n    \"ionic-plugin-keyboard\"\r\n  ],\r\n  \"cordovaPlatforms\": [],\r\n  \"description\": \"Mindfulness: An Ionic project\"\r\n}\r\n```\r\n\r\n\r\n**Other information:**\r\n<!-- List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to fix, Stack Overflow links, forum links, etc. -->\r\n\r\n**Ionic info:** (run `ionic info` from a terminal/cmd prompt and paste output below):\r\n\r\n```\r\nCordova CLI: 6.5.0 \r\nIonic Framework Version: 2.1.0\r\nIonic CLI Version: 2.2.1\r\nIonic App Lib Version: 2.2.0\r\nIonic App Scripts Version: 1.1.4\r\nios-deploy version: Not installed\r\nios-sim version: Not installed\r\nOS: Linux 4.4\r\nNode Version: v6.9.1\r\nXcode version: Not installed\r\n\r\n\r\n```\r\n\r\n\n\n_Copied from original issue: driftyco/ionic#11009_"},"comment":{"url":"https://api.github.com/repos/driftyco/ionic-native/issues/comments/291936703","html_url":"https://github.com/driftyco/ionic-native/issues/1311#issuecomment-291936703","issue_url":"https://api.github.com/repos/driftyco/ionic-native/issues/1311","id":291936703,"user":{"login":"IvanLencina","id":22304892,"avatar_url":"https://avatars3.githubusercontent.com/u/22304892?v=3","gravatar_id":"","url":"https://api.github.com/users/IvanLencina","html_url":"https://github.com/IvanLencina","followers_url":"https://api.github.com/users/IvanLencina/followers","following_url":"https://api.github.com/users/IvanLencina/following{/other_user}","gists_url":"https://api.github.com/users/IvanLencina/gists{/gist_id}","starred_url":"https://api.github.com/users/IvanLencina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvanLencina/subscriptions","organizations_url":"https://api.github.com/users/IvanLencina/orgs","repos_url":"https://api.github.com/users/IvanLencina/repos","events_url":"https://api.github.com/users/IvanLencina/events{/privacy}","received_events_url":"https://api.github.com/users/IvanLencina/received_events","type":"User","site_admin":false},"created_at":"2017-04-05T17:31:36Z","updated_at":"2017-04-05T17:31:36Z","body":"@chenlitchian\r\nIt seems that we have to update some other dependency, since I start a new project (just to see the packaje.json) and are using the new @ ionic-native / core. Although I did not try to generate the --prod --release.\r\n\r\nI have no idea why this may be happening. My app is already in development for 3 months and it is in production. I could not create a new project and copy the code, since I should create a new app in playstore, which contains consumables, a new app in firebase and move the bd, a new app in facebook and lose all analytics data, I do not find it feasible. That is why I am trying to solve this in my project."}}
{"actor":{"display_login":"IvanLencina"}}