I am trying to use the web scraper from https://github.com/BlakeStevenson/populartimes.js in my React JS project for school.
I keep getting an error that says: ../node_modules/populartimes.js/node_modules/puppeteer/lib/WebSocketTransport.js Module not found: Can't resolve 'ws' in ...
I did some research and I believe its an issue with how puppeteer interacts with React JS. Is there anyway I can fix this?
This is all the code that I am using that is associated with the scraper:
import React, { Component } from 'react';
import { Map, GoogleApiWrapper, InfoWindow, Marker } from 'google-maps-react';
let temp;
const populartimes = require('populartimes.js');
populartimes('ChIJKznozuF0hlQRbfbe7fJJ1rM').then(out => {temp=out.now.percent});
I have installed both websocket and puppeteer.