{"action":"created","issue":{"url":"https://api.github.com/repos/driftyco/ionic-cli/issues/650","labels_url":"https://api.github.com/repos/driftyco/ionic-cli/issues/650/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ionic-cli/issues/650/comments","events_url":"https://api.github.com/repos/driftyco/ionic-cli/issues/650/events","html_url":"https://github.com/driftyco/ionic-cli/issues/650","id":116365044,"number":650,"title":"ionic state restore: silently ignores cordova plugin add errors","user":{"login":"jopelkey","id":15266749,"avatar_url":"https://avatars.githubusercontent.com/u/15266749?v=3","gravatar_id":"","url":"https://api.github.com/users/jopelkey","html_url":"https://github.com/jopelkey","followers_url":"https://api.github.com/users/jopelkey/followers","following_url":"https://api.github.com/users/jopelkey/following{/other_user}","gists_url":"https://api.github.com/users/jopelkey/gists{/gist_id}","starred_url":"https://api.github.com/users/jopelkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jopelkey/subscriptions","organizations_url":"https://api.github.com/users/jopelkey/orgs","repos_url":"https://api.github.com/users/jopelkey/repos","events_url":"https://api.github.com/users/jopelkey/events{/privacy}","received_events_url":"https://api.github.com/users/jopelkey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-11T16:04:15Z","updated_at":"2015-11-11T16:12:14Z","closed_at":null,"body":"I updated my package.json to try out a new cordova-custom-config@1.1.5 version.\r\nTurns out that this version of the plugin has a dependency issue and fails to add, but when running\r\n'ionic state restore', the underlying error from the 'cordova plugin add cordova-custom-config@1.1.5' is not displayed and is silently ignored, leading it to look like the ionic command was indeed successful.  I'd prefer to see that error so I know there are issues with the underlying plugins.  Not seeing that makes troubleshooting/debugging much more difficult and misleading.\r\n\r\n**i.e. if I run 'ionic state restore' I get this output - which makes it look like everything is ok:**\r\n% ionic state restore\r\nAttempting to restore your Ionic application from package.json\r\n\r\nRestoring Platforms\r\n\r\ncordova platform add ios@3.9.2\r\n\r\nRestore platforms is complete\r\n\r\nRestoring Plugins\r\n\r\ncordova plugin add cordova-custom-config@1.1.5\r\ncordova plugin add cordova-plugin-console@1.0.1\r\ncordova plugin add cordova-plugin-device@1.0.1\r\ncordova plugin add cordova-plugin-dialogs@1.1.1\r\ncordova plugin add cordova-plugin-globalization@1.0.1\r\ncordova plugin add cordova-plugin-media@1.0.1\r\ncordova plugin add cordova-plugin-screen-orientation@1.4.0\r\ncordova plugin add cordova-plugin-splashscreen@2.1.0\r\ncordova plugin add cordova-plugin-vibration@1.2.0\r\ncordova plugin add cordova-plugin-whitelist@1.1.0\r\ncordova plugin add ionic-plugin-keyboard@1.0.7\r\ncordova plugin add phonegap-plugin-push@1.4.2\r\nRestore plugins is complete\r\n\r\nIonic state restore completed\r\n\r\n**But when I run 'ionic plugin add cordova-custom-config@1.1.5 I see the expected errors**\r\nFetching plugin \"cordova-custom-config@1.1.5\" via npm\r\nInstalling \"cordova-custom-config\" for ios\r\nFailed to install 'cordova-custom-config':Error: Cannot find module 'read-package-json'\r\n    at Function.Module._resolveFilename (module.js:337:15)\r\n    at Function.Module._load (module.js:287:25)\r\n    at Module.require (module.js:366:17)\r\n    at require (module.js:385:17)\r\n    at getPackagesFromJson (/src/aa/push/devo/mobile/plugins/cordova-custom-config/hooks/resolveDependencies.js:17:18)\r\n    at installRequiredNodeModules (/src/aa/push/devo/mobile/plugins/cordova-custom-config/hooks/resolveDependencies.js:77:5)\r\n    at module.exports (/src/aa/push/devo/mobile/plugins/cordova-custom-config/hooks/resolveDependencies.js:97:3)\r\n    at runScriptViaModuleLoader (/src/aa/push/devo/mobile/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:151:18)\r\n    at runScript (/src/aa/push/devo/mobile/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:129:16)\r\n    at /src/aa/push/devo/mobile/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:114:20\r\nError: Cannot find module 'read-package-json'\r\n "},"comment":{"url":"https://api.github.com/repos/driftyco/ionic-cli/issues/comments/155830213","html_url":"https://github.com/driftyco/ionic-cli/issues/650#issuecomment-155830213","issue_url":"https://api.github.com/repos/driftyco/ionic-cli/issues/650","id":155830213,"user":{"login":"jbavari","id":1414692,"avatar_url":"https://avatars.githubusercontent.com/u/1414692?v=3","gravatar_id":"","url":"https://api.github.com/users/jbavari","html_url":"https://github.com/jbavari","followers_url":"https://api.github.com/users/jbavari/followers","following_url":"https://api.github.com/users/jbavari/following{/other_user}","gists_url":"https://api.github.com/users/jbavari/gists{/gist_id}","starred_url":"https://api.github.com/users/jbavari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbavari/subscriptions","organizations_url":"https://api.github.com/users/jbavari/orgs","repos_url":"https://api.github.com/users/jbavari/repos","events_url":"https://api.github.com/users/jbavari/events{/privacy}","received_events_url":"https://api.github.com/users/jbavari/received_events","type":"User","site_admin":false},"created_at":"2015-11-11T16:12:14Z","updated_at":"2015-11-11T16:12:14Z","body":"Yep, we just patched that [in this PR](https://github.com/driftyco/ionic-app-lib/pull/27).\r\n\r\nWe'll release it soon. Thanks for reporting."}}