I have an ionic v1 project but I've been experimenting with v2 so I have the latest beta ionic-cli installed, and I get the following error attempting to do ionic state reset:
$ ionic state reset --verbose
Task setting: title=state, name=state, summary=Saves or restores state of your Ionic Application using the package.json file, <COMMAND>=[ save | restore | clear | reset ], save=Save the platforms and plugins into package.json, restore=Restore the platforms and plugins from package.json, clear=Clear the package.json of cordovaPlugins and cordovaPlatforms, as well as clear out the platforms and plugins folders, reset=Clear out the platforms and plugins directories, and reinstall plugins and platforms, title=Only do operations with plugins, boolean=true, title=Only do operations with platforms, boolean=true, module=./ionic/state
Looking up Ionic root, cwd: /Users/ranger/rcs/opennms-compass
Ionic root directory: /Users/ranger/rcs/opennms-compass
WARN: ionic.project has been renamed to ionic.config.json, please rename it.
WARN: ionic.project has been renamed to ionic.config.json, please rename it.
Removed platforms and plugins
State.restoreState /Users/ranger/rcs/opennms-compass platforms=true, plugins=true
Attempting to restore your Ionic application from package.json
Restoring Platforms
State.restorePlatforms /Users/ranger/rcs/opennms-compass name=OpenNMS, version=2.1.0, build=401, description=OpenNMS Compass, type=git, url=http://github.com/OpenNMS/opennms-compass.git, bower=*, commonmark=*, conventional-changelog-cli=^1.1.1, cordova-android=*, cordova-config-utils=^2.2.1, css-loader=^0.23.1, eslint=^1.10.3, eslint-friendly-formatter=^1.2.2, eslint-loader=^1.3.0, exports-loader=^0.6.3, expose-loader=^0.7.1, file-loader=^0.8.5, fs.extra=*, grunt-conventional-changelog=*, html-loader=^0.4.3, imports-loader=^0.6.5, jshint=*, jshint-stylish=*, libxmljs=^0.17.1, lodash=^4.10.0, lodash.padstart=^4.4.0, merge2=*, ng-annotate-webpack-plugin=^0.1.2, ngtemplate-loader=^1.3.1, node-sass=^3.4.2, phantomjs=^2.1.7, sass-loader=^3.2.0, script-loader=^0.6.1, shelljs=^0.6.0, style-loader=^0.13.0, url-loader=^0.5.7, webpack=^1.12.15, xcode=^0.8.4, xmldom=^0.1.22, xpath=0.0.22, cordovaPlugins=[ionic-plugin-keyboard, cordova-plugin-extension, cordova-plugin-console, cordova-plugin-datepicker, locator=https://github.com/apache/cordova-plugin-file, id=cordova-plugin-file, cordova-plugin-geolocation, locator=https://github.com/RangerRick/google-analytics-plugin, id=cordova-plugin-google-analytics, cordova-plugin-inappbrowser, cordova-plugin-network-information, cordova-plugin-splashscreen, cordova-plugin-statusbar, cordova-plugin-whitelist, locator=https://github.com/bez4pieci/Phonegap-Cookies-Plugin, id=com.bez4pieci.cookies, locator=https://github.com/RangerRick/cordova-certificate-plugin.git, id=com.raccoonfink.cordova.plugins.certificates, locator=https://github.com/OpenNMS/cordova-plugin-json-storage.git, id=cordova-plugin-json-storage, locator=https://github.com/RangerRick/cordova-HTTP.git, id=com.raccoonfink.cordova.plugins.http, cordova-plugin-screen-orientation, cordova-plugin-crosswalk-webview], cordovaPlatforms=[platform=android, version=5.1.1, locator=android, platform=ios, version=4.1.0, locator=ios], setup=bower install && npm install && ionic state reset, webpack=webpack --colors --display-error-details, webpack-release=webpack --colors --display-error-details --env=production, build=npm run webpack && ionic build, release-build=ionic prepare --release && npm run webpack-release && ionic build --release, changelog=conventional-changelog -p angular -i CHANGELOG.md -s -r 0 -u, prepare=npm run webpack && ionic prepare, increment=bin/update-build-number.js, release=npm run lint && npm run test && npm run release-build && bin/sign-android.sh, verbose-build=npm run lint && npm run test && webpack --debug --colors --display-modules --display-chunks --display-error-details --display-origins --display-reasons, genymotion=ionic run -slc android, android=ionic emulate -slc android, ios=ionic emulate -slc --address=localhost --target='iPhone-6s, 9.3' ios, device=ionic run --device -slc ios, watch=webpack --colors --display-error-details --watch, lint=eslint . --ext .js
cordova platform add android
cordova platform add ios
Restore platforms is complete
Restoring Plugins
State.restorePlugins /Users/ranger/rcs/opennms-compass name=OpenNMS, version=2.1.0, build=401, description=OpenNMS Compass, type=git, url=http://github.com/OpenNMS/opennms-compass.git, bower=*, commonmark=*, conventional-changelog-cli=^1.1.1, cordova-android=*, cordova-config-utils=^2.2.1, css-loader=^0.23.1, eslint=^1.10.3, eslint-friendly-formatter=^1.2.2, eslint-loader=^1.3.0, exports-loader=^0.6.3, expose-loader=^0.7.1, file-loader=^0.8.5, fs.extra=*, grunt-conventional-changelog=*, html-loader=^0.4.3, imports-loader=^0.6.5, jshint=*, jshint-stylish=*, libxmljs=^0.17.1, lodash=^4.10.0, lodash.padstart=^4.4.0, merge2=*, ng-annotate-webpack-plugin=^0.1.2, ngtemplate-loader=^1.3.1, node-sass=^3.4.2, phantomjs=^2.1.7, sass-loader=^3.2.0, script-loader=^0.6.1, shelljs=^0.6.0, style-loader=^0.13.0, url-loader=^0.5.7, webpack=^1.12.15, xcode=^0.8.4, xmldom=^0.1.22, xpath=0.0.22, cordovaPlugins=[ionic-plugin-keyboard, cordova-plugin-extension, cordova-plugin-console, cordova-plugin-datepicker, locator=https://github.com/apache/cordova-plugin-file, id=cordova-plugin-file, cordova-plugin-geolocation, locator=https://github.com/RangerRick/google-analytics-plugin, id=cordova-plugin-google-analytics, cordova-plugin-inappbrowser, cordova-plugin-network-information, cordova-plugin-splashscreen, cordova-plugin-statusbar, cordova-plugin-whitelist, locator=https://github.com/bez4pieci/Phonegap-Cookies-Plugin, id=com.bez4pieci.cookies, locator=https://github.com/RangerRick/cordova-certificate-plugin.git, id=com.raccoonfink.cordova.plugins.certificates, locator=https://github.com/OpenNMS/cordova-plugin-json-storage.git, id=cordova-plugin-json-storage, locator=https://github.com/RangerRick/cordova-HTTP.git, id=com.raccoonfink.cordova.plugins.http, cordova-plugin-screen-orientation, cordova-plugin-crosswalk-webview], cordovaPlatforms=[platform=android, version=5.1.1, locator=android, platform=ios, version=4.1.0, locator=ios], setup=bower install && npm install && ionic state reset, webpack=webpack --colors --display-error-details, webpack-release=webpack --colors --display-error-details --env=production, build=npm run webpack && ionic build, release-build=ionic prepare --release && npm run webpack-release && ionic build --release, changelog=conventional-changelog -p angular -i CHANGELOG.md -s -r 0 -u, prepare=npm run webpack && ionic prepare, increment=bin/update-build-number.js, release=npm run lint && npm run test && npm run release-build && bin/sign-android.sh, verbose-build=npm run lint && npm run test && webpack --debug --colors --display-modules --display-chunks --display-error-details --display-origins --display-reasons, genymotion=ionic run -slc android, android=ionic emulate -slc android, ios=ionic emulate -slc --address=localhost --target='iPhone-6s, 9.3' ios, device=ionic run --device -slc ios, watch=webpack --colors --display-error-details --watch, lint=eslint . --ext .js
cordova plugin add ionic-plugin-keyboard
Caught exception:
undefined
Experiencing the same issue here for a quite long time now :/
FYI, reverting to [email protected] allowed me to complete a state reset cleanly, so it appears to be an issue with ionic@beta + v1 projects.
Hello all! Thanks for opening an issue with us. We are currently in the process of deprecating the ionic state commands in favor of doing it the cordova way. https://cordova.apache.org/docs/en/latest/platform_plugin_versioning_ref/index.html You can keep up with the status of this on #904 . Thanks for using Ionic!
FYI we found out that this errors came from the fact there were no www folder when running ionic state reset.
Thanks for using Ionic!
Thank you sir for providing Ionic!
Most helpful comment
FYI we found out that this errors came from the fact there were no www folder when running
ionic state reset.