0x800a1391 - JavaScript runtime error: 'angular' is undefined

When I try to deploy the app that I created with Ionic Framework 1.3.1 into a Windows 10 PC with Visual Studio 2015, I had this error:

Unhandled exception at line 8, column 1 in ms-appx-web://com.ionicframework.contadormus577700/www/js/app.js

0x800a1391 - JavaScript runtime error: ‘angular’ is undefined

The code of the app.js is:

// Ionic Starter App

// angular.module is a global place for creating, registering and retrieving Angular modules
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
// the 2nd parameter is an array of 'requires'
// 'starter.services' is found in services.js
// 'starter.controllers' is found in controllers.js
angular.module('app', ['ionic', 'app.controllers', 'app.routes', 'app.directives','app.services',])

.run(function($ionicPlatform) {       
  $ionicPlatform.ready(function() {
    // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
    // for form inputs)
    if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
    if (window.StatusBar) {
      // org.apache.cordova.statusbar required


<!DOCTYPE html>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">

    <script src="lib/ionic/js/ionic.bundle.js"></script>

    <!-- cordova script (this will be a 404 during development) -->
    <script src="cordova.js"></script>

    <!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
    <link href="css/ionic.app.css" rel="stylesheet">

    <link href="lib/ionic/css/ionic.css" rel="stylesheet">

    <style type="text/css">
      .platform-ios .manual-ios-statusbar-padding{
      .manual-remove-top-padding .scroll{
        padding-top:0px !important;
      ion-list.manual-list-fullwidth div.list, .list.card.manual-card-fullwidth {
      ion-list.manual-list-fullwidth div.list > .item, .list.card.manual-card-fullwidth > .item {
        border-right: 0px;

    <script src="js/app.js"></script>
    <script src="js/controllers.js"></script>
    <script src="js/routes.js"></script>

    <script src="js/directives.js"></script>

    <script src="js/services.js"></script>

    <!-- Only required for Tab projects w/ pages in multiple tabs 
    <script src="lib/ionicuirouter/ionicUIRouter.js"></script>

  <body ng-app="app" animation="slide-left-right-ios7">
  <div style="">
    <div style="">
        <ion-nav-bar class="bar-stable">
            <ion-nav-back-button class="button-icon icon ion-ios-arrow-back">Back</ion-nav-back-button>

I tried to solve the problem with this page but the error continues: Ionic Visual Studio 2015 template get ‘Angular is undefined’ error when trying to start in debug for Windows

Anybody have any ideas why this does not work?

Thanks in advance

you have an excess comma(,) in your module dependecies

I deleted the comma, but the error continues

Had the same trouble. In my case the reason appeared to be the non-empty www\lib folder (it contained the angular folder inside, which was empty, but Bower still refused to reinstall angular’s package into it).
Try to clean up www\lib. Generally, try to clean up the whole project (remove everything, that’s re-generatable).