Hello,
I have an issue about running my project in angular 6, especially with node core modules
it says that :
ERROR in ./node_modules/elasticsearch/src/lib/connectors/http.js Module not found: Error: Can't resolve 'http' in '/home/mark/jobcumul/node_modules/elasticsearch/src/lib/connectors' ERROR in ./node_modules/aws-es-utils/target/node10/index.js Module not found: Error: Can't resolve 'zlib' in '/home/mark/jobcumul/node_modules/aws-es-utils/target/node10' ERROR in ./node_modules/aws-es-utils/target/node6/index.js Module not found: Error: Can't resolve 'zlib' in '/home/mark/jobcumul/node_modules/aws-es-utils/target/node6' ERROR in ./node_modules/aws-es-utils/target/node8/index.js Module not found: Error: Can't resolve 'zlib' in '/home/mark/jobcumul/node_modules/aws-es-utils/target/node8' ERROR in ./node_modules/elasticsearch/src/lib/connectors/http.js Module not found: Error: Can't resolve 'zlib' in '/home/mark/jobcumul/node_modules/elasticsearch/src/lib/connectors'
I just changed the beginning to adapt for typescript:
`
import as elasticsearch from 'elasticsearch';
import as esHttpConnector from 'elasticsearch/src/lib/connectors/http';
import as AWS from 'aws-sdk';
import as awsEs from 'aws-es-utils';
var let client = new elasticsearch.Client({
host: 'https://xxxx.ap-southeast-2.es.amazonaws.com',
connectionClass: awsEs.createESConnectorClass({
AWS: AWS,
superClass: esHttpConnector
}),
awsRequestSigning: true
});
`
Hello, I have an issue about running my project in angular 6, especially with node core modules it says that :
ERROR in ./node_modules/elasticsearch/src/lib/connectors/http.js Module not found: Error: Can't resolve 'http' in '/home/mark/jobcumul/node_modules/elasticsearch/src/lib/connectors' ERROR in ./node_modules/aws-es-utils/target/node10/index.js Module not found: Error: Can't resolve 'zlib' in '/home/mark/jobcumul/node_modules/aws-es-utils/target/node10' ERROR in ./node_modules/aws-es-utils/target/node6/index.js Module not found: Error: Can't resolve 'zlib' in '/home/mark/jobcumul/node_modules/aws-es-utils/target/node6' ERROR in ./node_modules/aws-es-utils/target/node8/index.js Module not found: Error: Can't resolve 'zlib' in '/home/mark/jobcumul/node_modules/aws-es-utils/target/node8' ERROR in ./node_modules/elasticsearch/src/lib/connectors/http.js Module not found: Error: Can't resolve 'zlib' in '/home/mark/jobcumul/node_modules/elasticsearch/src/lib/connectors'
I just changed the beginning to adapt for typescript: ` import as elasticsearch from 'elasticsearch'; import as esHttpConnector from 'elasticsearch/src/lib/connectors/http'; import as AWS from 'aws-sdk'; import as awsEs from 'aws-es-utils';
var let client = new elasticsearch.Client({ host: 'https://xxxx.ap-southeast-2.es.amazonaws.com', connectionClass: awsEs.createESConnectorClass({ AWS: AWS, superClass: esHttpConnector }), awsRequestSigning: true }); `