Uncaught ReferenceError: require is not defined


#1

Good afternoon, I am unable to use the require command in app.js.
whenever I try, an error appears saying that the command has not been set

error message:
Uncaught ReferenceError: require is not defined, http://192.168.100.102:8100/js/app.js, Line: 2

app.js:
angular.module ( ‘starter’ [ ‘ionic’, ‘starter.controllers’ ‘starter.services’])
.constant ( ‘jssip’ require ( ‘JsSip’) (32))

.js files in index.html:

<! - Cordova script (this will be a 404 During development) ->
<Script type = "text / javascript" src = "cordova.js"> </ script>
 
<! - Ionic / js AngularJS ->
<Script src = "lib / ionic / js / ionic.bundle.js"> </ script>


<! - Your app's js ->
<Script src = "js / app.js"> </ script>
<Script src = "js / controllers.js"> </ script>
<Script src = "js / services.js"> </ script>

#2

I found the solution :
I ran the following command in the terminal :
browserify app.js > bundle.js

and then I went on index.html and changed:
<script src="js/app.js"></script>
to:
<script src="js/bundle.js"></script>