1:17:24 AM react.1 | Failed to compile.
1:17:24 AM react.1 | ./node_modules/newsapi/dist/index.js
1:17:24 AM react.1 | Module not found: Can't resolve 'core-js/modules/es6.array.index-of' in
'C:\Users\abc\xyz-app\node_modules\newsapi\dist'
1:17:24 AM react.1 | Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys'
1:17:24 AM react.1 | Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat 'C:\pagefile.sys'
1:17:24 AM react.1 | Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat 'C:\swapfile.sys'
My file --->
import { NewsAPI } from 'newsapi'
const newsapi = new NewsAPI('api key string goes here');
//const NewsAPI = require('newsapi'); **Tried both commonJS and ES6 imports...same error**
function getNews(){
newsapi.v2.everything({
q: 'bitcoin',
sources: 'bbc-news,the-verge',
domains: 'bbc.co.uk, techcrunch.com',
from: '2017-12-01',
to: '2017-12-12',
language: 'en',
sortBy: 'relevancy',
page: 2
}).then(response => {
console.log(response);
/*
{
status: "ok",
articles: [...]
}
*/
});
}
I can't seem to figure this out...I feel incredibly dumb guys but I am so excited to use this library...if anyone could provide any sort of direction I would be so grateful!!! Thank you so much.
1:17:24 AM react.1 | Failed to compile. 1:17:24 AM react.1 | ./node_modules/newsapi/dist/index.js 1:17:24 AM react.1 | Module not found: Can't resolve 'core-js/modules/es6.array.index-of' in 'C:\Users\abc\xyz-app\node_modules\newsapi\dist' 1:17:24 AM react.1 | Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys' 1:17:24 AM react.1 | Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat 'C:\pagefile.sys' 1:17:24 AM react.1 | Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat 'C:\swapfile.sys'
My file --->
I can't seem to figure this out...I feel incredibly dumb guys but I am so excited to use this library...if anyone could provide any sort of direction I would be so grateful!!! Thank you so much.