Invalid regular expression error


#1

I just updated a project from beta 11 to 13. When I run it via ionic serve, I get a black screen in the browser and this in the console:

Uncaught SyntaxError: Invalid regular expression: missing / ionic.bundle.js:508
Uncaught ReferenceError: angular is not defined app.js:4
Uncaught ReferenceError: angular is not defined controllers.js:5
Uncaught ReferenceError: angular is not defined


#2

The code around ionic.bundle.js lin 508 is:

// pointer type
ionic.Gestures.POINTER_Mocity
*/


#3

i m getting a similar error.

0 507179 error SyntaxError: Expected an identifier but found ‘compile’ instead, http://192.168.1.12:8100/lib/ionic/js/ionic.bundle.js, Line: 507
1 507180 error TypeError: ‘undefined’ is not an object (evaluating ‘angular.isDefined’), http://192.168.1.12:8100/lib/ionic/js/angular-ui/angular-ui-router.js, Line: 18
2 507181 error ReferenceError: Can’t find variable: angular, http://192.168.1.12:8100/js/app.js, Line: 6
3 507181 error ReferenceError: Can’t find variable: angular, http://192.168.1.12:8100/js/controllers.js, Line: 7
4 507182 error ReferenceError: Can’t find variable: angular, http://192.168.1.12:8100/js/services.js, Line: 6

it was working earlier

i ran “$ ionic lib update” command and then started getting errors.


#4

Did you update with the ionic CLI? There was a bug in past versions that cut off files sometimes. Would you be able to try the latest CLI and and run ionic lib update again?


#5

At the time I posted this, yes, I was at the latest CLI. I still am now (just checked).

Any ideas? Can I run ionic lib update a second time?


#6

Can’t hurt. Also try to update with bower install.


#7

Running the update again helped. That was simple. If it happens again I’ll try to check Terminal and see if anything was amiss, but I’m sure I would have noticed an error before.