Ionic Serve : File changes not reflecting in development mode

Hi,

When I am running my ionic 2 app in development environment by running Ionic Serve command a chrome browser instant opens very quicly.But if I make change to any application file, this changes are not reflecting and it hangs on “webpack started …”.

I need to stop the process and re-run the ionic serve. Please help to fix this issue

I have the same problem, but re-running the ionic serve doesn’t fix the issue.

Try to use
npm run ionic:serve

@gilaz it didn’t work instead got error after running the command.

FYI I have this problem sometimes. Sometimes I have to add or remove white space and re save the file for the changes to show up. Its a pain when troubleshooting because you think your changes haven’t fixed an issue but I’ve come to resort to adding something static on pages at times just to be sure the update is being applied (i.e. ion-item with “Here’s a change” in it). Usually happens when I update template and then the component. I’ll have to go and modify the template again to see changes. Feels like the old template is cached somehow and needs to be “touched” to reload. See if that helps you.

1 Like

@awynham the problem is when I change any code , building , minification and rendering take much time.Sometimes it never loads and then I have to stop it and re-run the command ionic serve

I noticed that console is showing below message after ionic serve command is run.

[19:51:40] webpack started …
[19:51:49] build started …
[19:51:49] transpile update started …
[19:51:49] transpile update finished (node:16940) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 incremental_build_failed listeners added. Use emitter.setMaxListeners() to increase limit
in 36 ms(node:16940) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 incremental_build_success listeners added. Use emitter.setMaxListeners() to increase limit

[19:51:49] webpack started …

any update on this issue?

I solved this problem by removing the folder node_modules/ and file package-lock.json, then at terminal run:
npm install --save

the issue is back in latest appscript
ionic serve does not reflect changes, even after manual reload, we have to goto to that file make some changes then save to get changes reflected in output,

solved my issue thanks.