I'm encountering an error while trying to execute my app:
bundle.js:188 Uncaught Error: [$injector:modulerr] Failed to instantiate
module app due to:
TypeError: Cannot read property 'setKey' of undefined
This is my app.js file
require('angular')
require('angular-route')
var app = angular.module('app',['ngRoute'])
require('./services/car_service')(app);
require('./services/auth_service')(app);
require('./services/error_service')(app);
require('./controllers/car-controller.js')(app)
require('./controllers/user-controller.js')(app)
app.config(['$routeProvider', function(router, filepickerProvider) {
router
.when('/', {
templateUrl: 'templates/home.html'
})
.when('/login', {
controller: 'UserController',
controllerAs: 'userctrl',
templateUrl: 'templates/login.html'
})
.when('/submit', {
templateUrl: 'templates/submit.html'
})
.when('/inventory', {
templateUrl: 'templates/inventory.html'
})
.when('/new-admin', {
templateUrl: 'templates/new-admin.html'
})
.when('/admin-view', {
templateUrl: 'templates/admin-view.html'
})
filepickerProvider.setKey(FILEPICKER);
}])
I am unsure about what could be causing this issue, any advice or suggestions would be greatly appreciated.