I downloaded Ionic 3 few days ago and everything worked just fine when all of the sudden yesterday this error showed up after every ionic command I tried to use inside and outside my project dir (ionic info, ionic serve, ionic start etc.):
{ Error at FatalException.Exception (C:\Users\X\AppData\Roaming\npm\node_modules\ionic\node_modules@ionic\cli-utils\dist\lib\errors.js:8:23) at FatalException (C:\Users\X\AppData\Roaming\npm\node_modules\ionic\node_modules@ionic\cli-utils\dist\lib\errors.js:17:9) at Config. (C:\Users\X\AppData\Roaming\npm\node_modules\ionic\node_modules@ionic\cli-utils\dist\lib\config.js:41:31) at throw (native) at rejected (C:\Users\X\AppData\Roaming\npm\node_modules\ionic\node_modules@ionic\cli-utils\dist\lib\config.js:5:65) name: ‘Exception’, exitCode: 1, fatal: true }
I have tried to delete ionic and cordova and reinstall many times using many different instructions I found online:
I made sure they were really installed and uninstalled via npm -g list --depth=0
I’ve also tried to delete and reinstall node (following this instructions) but this error stay with every version of ionic 3.X I tried.
ionic 2 on the other hand work great. any Idea what might have caused that and how to fix it?
I’m using:
Windows 10
npm : 4.6.1
node: v6.10.3
cordova: 7.0.1
version of ionic 3 I tried:
3.0.0
3.1.0
3.1.1
3.1.2
3.2.0
Are you talking about the Ionic CLI that you install via npm (npm install -g ionic) or the framework inside the app?
Post your npm list -g --depth=0 please.
when I type ionic without anything else same error as above appear
when I type cordova without anything else it work as usual :
Synopsis
cordova command [options]
Global Commands
create … Create a project
help … Get help for a command
telemetry … Turn telemetry collection on or off
config … Set, get, delete, edit, and list global cordova options
Project Commands
info … Generate project information
requirements … Checks and print out all the requirements
for platforms specified
platform ........................... Manage project platforms
plugin ............................. Manage project plugins
prepare ............................ Copy files into platform(s) for building
compile ............................ Build platform(s)
clean .............................. Cleanup project from build artifacts
run ................................ Run project
(including prepare && compile)
serve .............................. Run project with a local webserver
(including prepare)
Learn more about command options using 'cordova help ’
Options
-v, --version … prints out this utility’s version
-d, --verbose … debug mode produces verbose log output for all activity,
–no-update-notifier … disables check for CLI updates
–nohooks … suppress executing hooks
(taking RegExp hook patterns as parameters)
Hm, so something is really broken with your ionic install. Can you uninstall again and make sure via npm -g list --depth=0 that it is really uninstalled?
Then show us the output of npm install -g ionic --verbose. Something has to go wrong there.
Next step: I see you are on windows. Unnstall npm and node and install nvm-windows. Use it to reinstall node and then try the command above again. This solves some rights stuff and makes node a lot more friendly on Windows.
I managed to fix it ! There is a folder that don’t removed when uninstall under c:/users/{user}/.ionic , in there there is a config json file and in my case it was empty so I deleted the folder than reinstalled ionic and it worked !