I am trying to build Elasticsearch Angular app. I am using require.js.
main.js
require.config({
paths : {
'angular' : '../bower_components/angular/angular',
'elasticsearch' : '../bower_components/elasticsearch/elasticsearch',
'app' : 'app',
'coreModule':'coreModule',
'esClient' : 'service/esClient'
},
shim : {
'app':{
'deps' : ['angular','coreModule']
},
'coreModule' : {
'deps' :['angular', 'elasticsearch','esClient']
},
'esClient' : {
'deps' :['angular', 'elasticsearch']
}
}
});
require(['app'], function(){
angular.bootstrap(document, ['app']);
});
esClient.js
define(function(){
var esClient=angular.module('esClient', ['elasticsearch']);
esClient.service('client', function (esFactory) {
return esFactory({
host: 'http://localhost:9200',
apiVersion: '1.5',
log: 'trace'
});
});
});
But it is throwing the following errors. Anyone else faced this issue?
Uncaught TypeError: _.extend is not a function
40.__browserify_Buffer @ elasticsearch.angular.js:38901
s @ elasticsearch.angular.js:4
(anonymous function) @ elasticsearch.angular.js:4
24.../connection @ elasticsearch.angular.js:37262
s @ elasticsearch.angular.js:4
(anonymous function) @ elasticsearch.angular.js:4
15../lib/client @ elasticsearch.angular.js:18307
s @ elasticsearch.angular.js:4
e @ elasticsearch.angular.js:4
(anonymous function) @ elasticsearch.angular.js:4
Uncaught Error: [$injector:modulerr] Failed to instantiate module app due
to:
Error: [$injector:modulerr] Failed to instantiate module coreModule due to:
Error: [$injector:modulerr] Failed to instantiate module esClient due to:
Error: [$injector:modulerr] Failed to instantiate module elasticsearch due
to:
Error: [$injector:nomod] Module 'elasticsearch' is not available! You
either misspelled the module name or forgot to load it. If registering a
module ensure that you specify the dependencies as the second argument.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/384687d4-1fc2-41d1-b510-061b6b112d13%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.