The project code did not function as desired when using the latest versions of the npm packages as well as the latest version of Google Chrome. Specifically, clicking on the 'New Tweets' tab showed the loading spinner continuously and resulted in multiple CORS-related errors in the console.
The 'Manage Rules' tab seems to function as expected.
The 2 main culprits appeared to be:
- Missing CORS options in socketIo. My fix was to set the CORS options as follows.
const io = socketIo(server,{
cors: {
origin: "http://localhost:3000"
}
});
- And the use of io.emit('connect'...) in the server when that event type is reserved for the emit method. My fix was simply to delete that line.
These changes allowed the app to work for me.
The project code did not function as desired when using the latest versions of the npm packages as well as the latest version of Google Chrome. Specifically, clicking on the 'New Tweets' tab showed the loading spinner continuously and resulted in multiple CORS-related errors in the console.
The 'Manage Rules' tab seems to function as expected.
The 2 main culprits appeared to be:
These changes allowed the app to work for me.