# Blank white screen when ionic serve on any starter

**URL:** <https://forum.ionicframework.com/t/blank-white-screen-when-ionic-serve-on-any-starter/50705>\
**Category:** ionic-v3\
**Created:** [April 29, 2016, 3:55am UTC](https://forum.ionicframework.com/t/blank-white-screen-when-ionic-serve-on-any-starter/50705 "2016-04-29T03:55:28Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mobius77](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@Mobius77](https://forum.ionicframework.com/u/Mobius77)\
**Post date:** [April 29, 2016, 3:55am UTC](https://forum.ionicframework.com/t/blank-white-screen-when-ionic-serve-on-any-starter/50705/1 "2016-04-29T03:55:28Z")

</div>

I have (since beta4) been unable to get any of the (typescript) starters working using code such as the following (for the default Tab starter)

`ionic start TEST --v2 --ts`

which has `package.json`:

```
 "dependencies": {
    "angular2": "2.0.0-beta.15",
    "es6-shim": "^0.35.0",
    "ionic-angular": "2.0.0-beta.6",
    "ionic-native": "^1.1.0",
    "ionicons": "3.0.0-alpha.3",
    "rxjs": "5.0.0-beta.2"
  },
  "devDependencies": {
    "del": "2.2.0",
    "gulp": "3.9.1",
    "gulp-watch": "4.3.5",
    "ionic-gulp-browserify-typescript": "^1.1.0",
    "ionic-gulp-fonts-copy": "^1.0.0",
    "ionic-gulp-html-copy": "^1.0.0",
    "ionic-gulp-sass-build": "^1.0.0",
    "ionic-gulp-scripts-copy": "^1.0.1",
    "run-sequence": "1.1.5"
  },

```

**Firstly, if "ionic.config.js has been deprecated’, can the Ionic team please remove it from the starters so that we don’t get this message every time we install or do a serve, and thus need to delete it ourselves?**

My setup is as follows:

```
Cordova CLI: 6.0.0
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.6
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
OS: Windows 8.1
Node Version: v5.11.0

npm version is 3.8.8

```

After doing an `ionic serve` in the project directory I am only seeing this in the app.bundle.js:

```
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

},{}],2:[function(require,module,exports){
arguments[4][1][0].apply(exports,arguments)
},{"dup":1}]},{},[1,2])

//# sourceMappingURL=app.bundle.js.map

```

and there is nothing between the `<ion-app></ion-app>` tags of the HMTL body when live-reloaded into and viewed in Chrome Developer (i.e. the app hasn’t been injected there).

I have tried deleting the `node_modules` folder and doing a `npm install` but this has not fixed the problem.

I am able to successfully serve a beta4 project with the following package.json

```
  "dependencies": {
    "angular2": "^2.0.0-beta.13",
    "es6-promise": "3.0.2",
    "es6-shim": "^0.35.0",
    "ionic-angular": "^2.0.0-beta.4",
    "ionic-native": "^1.1.0",
    "ionicons": "3.0.0-alpha.3",
    "moment": "^2.12.0",
    "reflect-metadata": "0.1.2",
    "rxjs": "5.0.0-beta.2",
    "zone.js": "0.6.6"
  },
  "devDependencies": {
    "del": "2.2.0",
    "gulp": "3.9.1",
    "gulp-watch": "4.3.5",
    "ionic-gulp-browserify-typescript": "^1.0.1",
    "ionic-gulp-fonts-copy": "^1.0.0",
    "ionic-gulp-html-copy": "^1.0.0",
    "ionic-gulp-sass-build": "^1.0.0",
    "ionic-gulp-scripts-copy": "^1.0.0",
    "run-sequence": "^1.1.5",
    "typescript": "1.8.7"
  },

```

Despite this working, in both cases I always get FS and EPERM related errors such as the following when doing an `ionic serve`

```
Caught exception:
 Error: watch C:\Users\Mark\My Documents\App Development\test2\app\pages\page3\p
age3.scss EPERM
    at exports._errnoException (util.js:893:11)
    at FSWatcher.start (fs.js:1313:19)
    at Object.fs.watch (fs.js:1341:11)
    at createFsWatchInstance (C:\Users\Mark\Documents\App Development\test2\node
_modules\chokidar\lib\nodefs-handler.js:37:15)
    at setFsWatchListener (C:\Users\Mark\Documents\App Development\test2\node_mo
dules\chokidar\lib\nodefs-handler.js:80:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (C:\Users\Mark\Documents\App Dev
elopment\test2\node_modules\chokidar\lib\nodefs-handler.js:228:14)
    at FSWatcher.NodeFsHandler._handleFile (C:\Users\Mark\Documents\App Developm
ent\test2\node_modules\chokidar\lib\nodefs-handler.js:255:21)
    at FSWatcher.<anonymous> (C:\Users\Mark\Documents\App Development\test2\node
_modules\chokidar\lib\nodefs-handler.js:473:21)
    at FSReqWrap.oncomplete (fs.js:82:15)

Mind letting us know? https://github.com/driftyco/ionic-cli/issues

```

but i believe that it maybe a Windows (8) related issue rather than ionic2 specific (albeit I never saw such errors when using ionic1). Or it might be related to the version of `graceful-fs` - there is a warning with some dependency during the `npm install` that the version of `graceful-fs` is deprecated and that ^4.0.0 should be used. I tried installing ^4.0.0 as a dev dependency in my project but that did not fix the FS watcher problems.

Anyway any advice would be appreciated as I’m stuck using my working beta4 project setup at the moment.

EDIT: The following issue is in regards to the deprecated graceful-fs version used by Ionic dependencies:

> <https://github.com/ionic-team/ionic-cli/issues/960>

---

<div class="post-metadata">

**Author:** ![iignatov](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/iignatov/32/100112_2.png) [@iignatov](https://forum.ionicframework.com/u/iignatov)\
**Post date:** [April 30, 2016, 4:09pm UTC](https://forum.ionicframework.com/t/blank-white-screen-when-ionic-serve-on-any-starter/50705/2 "2016-04-30T16:09:42Z")

</div>

@Mobius77 I’m not able to reproduce this, creating a new project works just fine:

```plaintext
ionic start Test --v2 --ts
cd Test
ionic serve

```

Maybe it’s something environment-related, here’s my current setup:

```plaintext
Cordova CLI: 6.1.1
Gulp version: CLI version 1.2.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.6
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
OS: Windows 8.1
Node Version: v5.8.0

```

Not sure if you’ve seen this, but I’ll recommend you the following topic for upgrading to `beta.6`:

> [@Ionic 2 Projects: updating to beta.6](https://forum.ionicframework.com/t/ionic-2-projects-updating-to-beta-6/50049):
>
> Hello Ionites! Migration guide extraordinaire @iignatov has created another excellent resource which he asked me to share with you, since there were some changes to imports in the starters as of beta.6. &nbsp;&nbsp;1. Update the Ionic CLI to the latest version: npm install -g ionic@beta &nbsp;&nbsp;2. If you’re upgrading a project using Ionic 2.0.0-beta.3 or older [check out the following guide](https://forum.ionicframework.com/t/ionic-2-projects-updating-to-beta-4/49054) first. &nbsp;&nbsp;3. Remove the line import 'es6-shim' from app.ts/app.js. If you’re using webpack, remove ‘es6-shim’ from the e…

---

<div class="post-metadata">

**Author:** ![Mobius77](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@Mobius77](https://forum.ionicframework.com/u/Mobius77)\
**Post date:** [May 1, 2016, 3:55am UTC](https://forum.ionicframework.com/t/blank-white-screen-when-ionic-serve-on-any-starter/50705/3 "2016-05-01T03:55:20Z")

</div>

@iignatov Thanks but I did a complete environment uninstall then reinstall (i.e. uninstall all global packages, uninstalled Node, reinstalled Node 5.8.0 which is the same as yours, installed latest ionic CLI) and this did not fix the problem when serving an ionic2 starter. My feeling is that the FS watcher issues I am experiencing are more prevalent with the angular2 or ionic-angular version update (more files to watch than can be handled?) and so during the gulp build the app.html/ts is not being read and hence not being copied to the bundle.

Alternatively, the EPERM error I am getting with the Watch relates to file permissions - I have uninstalled or turned off all software that may be locking the files from having permission to read/delete/rename or whatever the gulp-watch or other devDependency processes (e.g. del, ionic-gulp-browserify-typescript) are doing which may be causing a read conflict. I downgraded ionic-gulp-browserify-typescript to 1.0.1 (vs 1.1.0) in the starter and this did not fix the problem. I have admin rights to the computer/files.

I don’t want to update my working beta4 project (i.e. I can successfully ionic serve it despite similar Watch and EPERM issues) to beta6 because if the beta6 starters don’t work for me then an upgrade to beta6 being successful is unlikely. And with the beta4 set-up at least I can compare and maybe isolate the problem (ionic-angular version vs angular2 version vs browserify vs gulpfile.js etc).

So I will keep trying to uncover the issue but since it is evident we have the same OS, installed versions and I am apparently the only person in the world with this problem it is extremely frustrating to say the least!

Cheers

---

<div class="post-metadata">

**Author:** ![iignatov](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/iignatov/32/100112_2.png) [@iignatov](https://forum.ionicframework.com/u/iignatov)\
**Post date:** [May 1, 2016, 1:47pm UTC](https://forum.ionicframework.com/t/blank-white-screen-when-ionic-serve-on-any-starter/50705/4 "2016-05-01T13:47:05Z")

</div>

@Mobius77 Thanks for the detailed reply! I agree that [NodeJS development on Windows is no joy](https://github.com/nodejs/node-gyp/issues/629). And the initial environment setup sometimes might be [way too complicated](http://stackoverflow.com/a/32447103) _(I’m not sure if this is still the case though)_.

When it’s still not working after a complete reinstall of Node and everything related, I’m not sure if I could help you further. Maybe you could try to run the _Node.js command prompt_ as _Administrator_ to see if it’ll help with the permission errors. It’s not a good practice but I saw it mentioned in many Windows-related issues.

It seems that there’s already an open issue for something similar:

> <https://github.com/ionic-team/ionic-cli/issues/931>
>
> ionic serve fails.. Its just a basic ionic 2 angular 2 project installed with c…ommand "ionic start \<project name\> tab --v2 --ts " 
> it was working a little while ago.. i commit the basic working project and did the changes to page1.html. and it stopped working. It git the git checkout to discard the changes but it is still not working.
> 
> Here is the error in git bash :
> 
> \---
> 
> $ ionic serve
> 
> Running 'serve:before' gulp task before serve
> \[13:07:31\] Starting 'clean'...
> \[13:07:31\] Finished 'clean' after 8.04 ms
> \[13:07:31\] Starting 'watch'...
> \[13:07:31\] Starting 'sass'...
> \[13:07:31\] Starting 'html'...
> \[13:07:31\] Starting 'fonts'...
> \[13:07:31\] Starting 'scripts'...
> \[13:07:32\] 'fonts' errored after 37 ms
> \[13:07:32\] Error: EPERM: operation not permitted, mkdir 'C:\\DEV\\workspace\\Github\\travelMBTA\\www\\build\\fonts'
> at Error (native)
> \[13:07:35\] 'scripts' errored after 3.3 s
> \[13:07:35\] Error: EPERM: operation not permitted, mkdir 'C:\\DEV\\workspace\\Github\\travelMBTA\\www\\build\\js'
> at Error (native)
> Live Reload failed to start, error: Error: EPERM: operation not permitted, lstat 'C:\\DEV\\workspace\\Github\\travelMBTA\\www\\build'
> Ionic serve failed - error: Error: EPERM: operation not permitted, lstat 'C:\\DEV\\workspace\\Github\\travelMBTA\\www\\build'
> Ionic server commands, enter:
> restart or r to restart the client app from the root
> goto or g and a url to have the app navigate to the given url
> consolelogs or c to enable/disable console log output
> serverlogs or s to enable/disable server log output
> quit or q to shutdown the server and exit
> 
> ionic $ \[13:07:35\] 'sass' errored after 3.81 s
> \[13:07:35\] Error: EPERM: operation not permitted, mkdir 'C:\\DEV\\workspace\\Github\\travelMBTA\\www\\build\\css'
> at Error (native)
> \[13:07:35\] 'html' errored after 3.8 s
> \[13:07:35\] Error: EPERM: operation not permitted, mkdir 'C:\\DEV\\workspace\\Github\\travelMBTA\\www\\build\\pages\\page1'
> at Error (native)
> 7.7 MB bytes written (16.16 seconds)
> Caught exception:
> Error: EPERM: operation not permitted, mkdir 'C:\\DEV\\workspace\\Github\\travelMBTA\\www\\build\\js'
> at Error (native)
> 
> \---
> 
> i am working on windows 10
> ionic version: 2.0.0-beta.24

> **UPDATE:** I managed to successfully `start` and `serve` a new project on Windows 7 without performing the [complicated initial setup](http://stackoverflow.com/a/32447103), i.e. it’s seems that maybe it’s not needed anymore.

---

<div class="post-metadata">

**Author:** ![Mobius77](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@Mobius77](https://forum.ionicframework.com/u/Mobius77)\
**Post date:** [May 1, 2016, 2:04pm UTC](https://forum.ionicframework.com/t/blank-white-screen-when-ionic-serve-on-any-starter/50705/5 "2016-05-01T14:04:15Z")

</div>

@iignatov Thanks anyway. 🙂 I just spent a few hours more trying to resolve this with no success, argh! If I change the ‘watch’ in the following gulp task (in gulpfile.js) to ‘build’

`gulp.task('serve:before', ['watch']);`

thus bypassing all the watching (and those errors) I still get an app.bundle.js with the same content as my first post (i.e. without the actual app.ts/js code included). The app.bundle.js.map file does include the app.ts/js code though, so that’s confusing.

So it may be related to the code in the gulp tasks

```
var buildBrowserify = require('ionic-gulp-browserify-typescript');
var copyScripts = require('ionic-gulp-scripts-copy');

```

which I believe are responsible for creating app.bundle.js.

But that’s enough for me for today, will have a look at these tasks further if I still have the enthusiasm in the next few days…

---

<div class="post-metadata">

**Author:** ![iignatov](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/iignatov/32/100112_2.png) [@iignatov](https://forum.ionicframework.com/u/iignatov)\
**Post date:** [May 1, 2016, 2:22pm UTC](https://forum.ionicframework.com/t/blank-white-screen-when-ionic-serve-on-any-starter/50705/6 "2016-05-01T14:22:36Z")

</div>

@Mobius77 Have you tried to run _Node.js command prompt_ as _Administrator_? Isn’t your `beta.4` project also using Gulp/Browserify process? If it’s working with your `beta.4` project but it’s not working with a new `beta.6` project I would recommend you to compare/diff the two folders and see what’s the difference.

---

<div class="post-metadata">

**Author:** ![Mobius77](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@Mobius77](https://forum.ionicframework.com/u/Mobius77)\
**Post date:** [May 2, 2016, 2:00pm UTC](https://forum.ionicframework.com/t/blank-white-screen-when-ionic-serve-on-any-starter/50705/7 "2016-05-02T14:00:51Z")

</div>

@iignatov Thanks for reiterating whether I am running things as Administrator…that was the solution! I assumed that since I am a single user with Admin rights to my computer that I would automatically be running the command prompts as Administrator. Turns out this is not the case.

By right-clicking on Windows Command Prompt (on Windows 8.1), selecting ‘Run as Administrator’, and navigating to my project folder and running `ionic serve`, I was able to run both my beta4 project and the beta6 starter flawlessly (i.e. without any errors whatsoever) - yay! 😄

I usually use the Node.js command prompt - how do I ensure I’m running that as Administrator? When I right-click on it there is no option to run as Administrator…

Thanks again!

---

<div class="post-metadata">

**Author:** ![iignatov](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/iignatov/32/100112_2.png) [@iignatov](https://forum.ionicframework.com/u/iignatov)\
**Post date:** [May 2, 2016, 5:42pm UTC](https://forum.ionicframework.com/t/blank-white-screen-when-ionic-serve-on-any-starter/50705/8 "2016-05-02T17:42:31Z")

</div>

@Mobius77 I’m glad you got it working!

I’m not sure why the `Run as administrator` option is missing for `Node.js command prompt`.

In this case you could configure it to always execute with administrator privileges. To achieve this, locate its shortcut then right click and select `Properties` and then on the `Shortcut` tab there’s a button `Advanced...` - click it, mark the `Run as administrator` checkbox and click the `OK` button _(twice)_ to apply the changes. Then it should automatically be run as administrator every time you open it.

---

<div class="post-metadata">

**Author:** ![Mobius77](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@Mobius77](https://forum.ionicframework.com/u/Mobius77)\
**Post date:** [May 3, 2016, 2:08am UTC](https://forum.ionicframework.com/t/blank-white-screen-when-ionic-serve-on-any-starter/50705/9 "2016-05-03T02:08:46Z")

</div>

@iignatov My NodeJS command prompt is in the Taskbar and I now see the Run as Administrator option when right-clicking the icon on the Taskbar, and then **also** right-clicking the Node.js command prompt’ entry.

Thanks for the instructions for setting it to Run as Administrator by default.

Cheers
