// you can also watch on events
google.on('result', function (item) {
console.log('out', item);
});
but it is throwing me an error when I hit "npm install images-scraper"
Error: socket hang up
at TLSSocket.onHangUp (_tls_wrap.js:1124:19)
at TLSSocket.g (events.js:292:16)
at emitNone (events.js:91:20)
at TLSSocket.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
npm WARN Error: EPERM: operation not permitted, rmdir 'C:\Users\Akshay\Desktop\d
arwin\node_modules\@types'
npm WARN at Error (native)
npm WARN { Error: EPERM: operation not permitted, rmdir 'C:\Users\Akshay\Deskto
p\darwin\node_modules\@types'
npm WARN at Error (native)
npm WARN stack: 'Error: EPERM: operation not permitted, rmdir \'C:\Users\Aks
hay\Desktop\darwin\node_modules\@types\'\n at Error (native)',
npm WARN errno: -4048,
npm WARN code: 'EPERM',
npm WARN syscall: 'rmdir',
npm WARN path: 'C:\Users\Akshay\Desktop\darwin\node_modules\@types' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@1.7.6 postinstall: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron@1.7.6 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Akshay\AppData\Roaming\npm-cache_logs\2017-09-22T11_47_48
_512Z-debug.log
Hi, I am requiring it in my API and below is the code: var Scraper = require ('images-scraper') , google = new Scraper.Google();
google.list({ keyword: 'banana', num: 10, detail: true, nightmare: { show: true } }) .then(function (res) { console.log('first 10 results from google', res); }).catch(function(err) { console.log('err', err); });
// you can also watch on events google.on('result', function (item) { console.log('out', item); });
but it is throwing me an error when I hit "npm install images-scraper" Error: socket hang up at TLSSocket.onHangUp (_tls_wrap.js:1124:19) at TLSSocket.g (events.js:292:16) at emitNone (events.js:91:20) at TLSSocket.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9) npm WARN Error: EPERM: operation not permitted, rmdir 'C:\Users\Akshay\Desktop\d arwin\node_modules\@types' npm WARN at Error (native) npm WARN { Error: EPERM: operation not permitted, rmdir 'C:\Users\Akshay\Deskto p\darwin\node_modules\@types' npm WARN at Error (native) npm WARN stack: 'Error: EPERM: operation not permitted, rmdir \'C:\Users\Aks hay\Desktop\darwin\node_modules\@types\'\n at Error (native)', npm WARN errno: -4048, npm WARN code: 'EPERM', npm WARN syscall: 'rmdir', npm WARN path: 'C:\Users\Akshay\Desktop\darwin\node_modules\@types' } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! electron@1.7.6 postinstall:
node install.js
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the electron@1.7.6 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Akshay\AppData\Roaming\npm-cache_logs\2017-09-22T11_47_48 _512Z-debug.log
Please help. Thanks in advance !