App-scripts serve unexpectedly failed.settings: undefinedcontext: [object Object]

i went to 2.1.18 because that is the version i was running before the update to 3+ version. So, for more insurance.

downgrade to 2.2.3 works for me

I simply did ā€œnpm installā€ and it worked for me, I guess either a plugin or dependency was was not installed correctly

It should be fixed in next version of app scripts. Here is commit fixing the issue https://github.com/driftyco/ionic-app-scripts/commit/e5a4134b090d09342bbfb2b2fe16778663a9c151

2 Likes

You guys wonā€™t believe it!!! I had the same problem and did everything you said and nothing worked. So I just tried to use SUDO ionic serve (I use Ubuntu) and everything worked fine. I think ionic was trying to update something in the www folder after migrating to Ionic 3 and it was not possible without root privilegies. Please try that @siphiwe and see if works for you too. I also found this solution online: npm run ionic:serve

No, please donā€™t follow the above advice. There is never any need to run Ionic commands with elevated privileges. Fix your permission problems properly instead of perpetuating them with sudo.

1 Like

Try this:

npm run ionic:serve

It solved the problem for me.

I am running ionic cli version 3.3.0

3 Likes

wow, this magic really works! any explanation?

I am not pretty sure. But the error occurs when there are extra libraries. So, i assume that this overrides this error. Nevertheless, this command is more straightforward instead of ā€œionic serveā€, which executes much more code.

1 Like

I managed to fix the problem on Ubuntu 17.04 by increasing the number of files being watched.

echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

I suspect that the ionic serve build process may not be able to process all the files. That would explain why npm run ionic:serve works.

3 Likes

it does not anymore watch changes comparing to ionic serve

Yes indeed, but you canā€™t even develop your app with ā€œionic serveā€, so it is a good temporary solution!

:slight_smile: (oohhh, 20 characters)

This works perfect
Thanks a lot

This is good temporary solution that other have mentioned (though I havenā€™t tried them), in case you just want to view/test the app rather develop it.

Same case as yours! Thx!