# Ionic serve needs restart for every second change i do

**URL:** <https://forum.ionicframework.com/t/ionic-serve-needs-restart-for-every-second-change-i-do/48407>\
**Category:** ionic-v3\
**Created:** [April 5, 2016, 5:05am UTC](https://forum.ionicframework.com/t/ionic-serve-needs-restart-for-every-second-change-i-do/48407 "2016-04-05T05:05:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![larschla](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/larschla/32/98703_2.png) [@larschla](https://forum.ionicframework.com/u/larschla)\
**Post date:** [April 5, 2016, 5:05am UTC](https://forum.ionicframework.com/t/ionic-serve-needs-restart-for-every-second-change-i-do/48407/1 "2016-04-05T05:05:41Z")

</div>

I use ionic serve when developing my apps. It works fine for changes on html, and css files, but when i change a .ts file changes are updated in my browser on the first reload. Next time, the changes are not available in the browser, and i need to stop ionic serve, and start it back up again.

Anyone having the same problem? Is there some setting in webpack.config.js that needs to be set? It’s strange, though, since it works fine on the first save/refresh.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [April 5, 2016, 7:02pm UTC](https://forum.ionicframework.com/t/ionic-serve-needs-restart-for-every-second-change-i-do/48407/2 "2016-04-05T19:02:57Z")

</div>

Hmm, could you provide your ionic-cli version? `ionic v`

I haven’t seen this before, but the CLI and v2’s build process has been changing pretty fast so there may be something going on there.

---

<div class="post-metadata">

**Author:** ![bandito](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/bandito/32/94980_2.png) [@bandito](https://forum.ionicframework.com/u/bandito)\
**Post date:** [April 5, 2016, 9:32pm UTC](https://forum.ionicframework.com/t/ionic-serve-needs-restart-for-every-second-change-i-do/48407/3 "2016-04-05T21:32:30Z")

</div>

This happens to me too. I thought that was normal.

I am using 2.0.0-beta.23

That is when I write ionic -v

---

<div class="post-metadata">

**Author:** ![larschla](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/larschla/32/98703_2.png) [@larschla](https://forum.ionicframework.com/u/larschla)\
**Post date:** [April 6, 2016, 3:01am UTC](https://forum.ionicframework.com/t/ionic-serve-needs-restart-for-every-second-change-i-do/48407/4 "2016-04-06T03:01:32Z")

</div>

Here’s my ionic info:

Your system information:

Cordova CLI: 4.1.1  
Gulp version: CLI version 3.9.1  
Gulp local: Local version 3.9.1  
Ionic Version: 2.0.0-beta.3  
Ionic CLI Version: 2.0.0-beta.19  
Ionic App Lib Version: 2.0.0-beta.9  
ios-deploy version: 1.8.4  
ios-sim version: 5.0.4  
OS: Mac OS X El Capitan  
Node Version: v5.1.0  
Xcode version: Xcode 7.3 Build version 7D175

I can also add that this happens on both my home computer and my work one. I’ll find the ionic info once i get to work in a couple of hours.

Here’s the ionic info from my office computer:  
Your system information:

Cordova CLI: 4.2.0  
Ionic Version: 2.0.0-beta.3  
Ionic CLI Version: 2.0.0-beta.19  
Ionic App Lib Version: 2.0.0-beta.9  
ios-deploy version: Not installed  
ios-sim version: 5.0.6  
OS: Mac OS X El Capitan  
Node Version: v4.3.1  
Xcode version: Xcode 7.3 Build version 7D175

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [April 6, 2016, 4:37pm UTC](https://forum.ionicframework.com/t/ionic-serve-needs-restart-for-every-second-change-i-do/48407/5 "2016-04-06T16:37:55Z")

</div>

@larschla could you update the version of ionic-cli you have? Beta 19 is pretty old.

```auto
npm install -g ionic

```

Then start a new project and see if the issue is still there.

---

<div class="post-metadata">

**Author:** ![larschla](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/larschla/32/98703_2.png) [@larschla](https://forum.ionicframework.com/u/larschla)\
**Post date:** [April 7, 2016, 3:39am UTC](https://forum.ionicframework.com/t/ionic-serve-needs-restart-for-every-second-change-i-do/48407/6 "2016-04-07T03:39:43Z")

</div>

That worked fine for the new project, except that i get this message every time i save:

> TypeScript error: /Users/larschla/apps/testapp/node\_modules/angular2/src/facade/promise.d.ts(1,10): Error TS2661: Cannot re-export name that is not defined in the module.

What is worse, is that my ionic version 1 apps has stopped working with following messages:

> $ ionic build android  
> WARN: ionic.project has been renamed to ionic.config.json, please rename it.  
> Uh oh! Looks like you’re missing a module in your gulpfile:  
> Cannot find module ‘gulp’

> Do you need to run `npm install`?

So i run npm install, and try again:

> $ ionic build android  
> There is an error in your gulpfile:  
> Error: `libsass` bindings not found. Try reinstalling `node-sass`?  
> at getBinding (/Users/larsschlanbusch/utvikling/Flexite/adapt-it/mobile/eluapp/node\_modules/node-sass/lib/index.js:22:11)  
> at Object. (/Users/larsschlanbusch/utvikling/Flexite/adapt-it/mobile/eluapp/node\_modules/node-sass/lib/index.js:188:23)  
> at Module.\_compile (module.js:425:26)  
> at Object.Module.\_extensions…js (module.js:432:10)  
> at Module.load (module.js:356:32)  
> at Function.Module.\_load (module.js:313:12)  
> at Module.require (module.js:366:17)  
> at require (module.js:385:17)  
> at Object. (/Users/larsschlanbusch/utvikling/Flexite/adapt-it/mobile/eluapp/node\_modules/gulp-sass/index.js:3:17)  
> at Module.\_compile (module.js:425:26)

I need to be able to work on both v1 and v2 of ionic, since some of my old apps are written in v1. So this more or less breaks everything for me.

---

<div class="post-metadata">

**Author:** ![stirumala](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/stirumala/32/102281_2.png) [@stirumala](https://forum.ionicframework.com/u/stirumala)\
**Post date:** [June 9, 2016, 1:52pm UTC](https://forum.ionicframework.com/t/ionic-serve-needs-restart-for-every-second-change-i-do/48407/7 "2016-06-09T13:52:15Z")

</div>

npm install -g typescript this should solve ur problem

---

<div class="post-metadata">

**Author:** ![maxx0r](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/maxx0r/32/91299_2.png) [@maxx0r](https://forum.ionicframework.com/u/maxx0r)\
**Post date:** [June 9, 2016, 2:46pm UTC](https://forum.ionicframework.com/t/ionic-serve-needs-restart-for-every-second-change-i-do/48407/8 "2016-06-09T14:46:01Z")

</div>

Shouldnt he use the beta stream? i.e. npm install -g ionic@beta ?
