bootsie123 / F1-Web-Viewer

A simple grid-based web viewer for Formula 1
https://f1webviewer.netlify.app
ISC License
168 stars 23 forks source link

404 error #62

Closed NotTheRealTWCH closed 2 years ago

NotTheRealTWCH commented 2 years ago

Describe the bug When accessing the locally hosted website via the URL "http://localhost:3000", I get a 404 error and the HTML page displays the text, "Cannot GET /". There's a content security policy that blocks the favicon from loading, but I'm not sure if that affects the overall loading of the HTML page.

Screenshots image image

Desktop (please complete the following information):

bootsie123 commented 2 years ago

Hi! Thanks for posting this issue! I'm not sure if you mentioned this yet, but did you run npm run build?

NotTheRealTWCH commented 2 years ago

Yeah I have. I don't think you can run the server without building it, am I correct?

NotTheRealTWCH commented 2 years ago

I've tried to go through the process again so you can see what's happening. There are some errors/warnings for deprecated dependencies I believe. @bootsie123 image image image

bootsie123 commented 2 years ago

Ah. It seems that it fails while building the site which then causes none of the expected files to be created. Thus the 404 error.

I think you're probably right with it most likely being a combination of depreciated packages along with you using a different node and npm version.

Looking further, it seems to be an issue with webpack and node 17 according to this issue. Could you try running export NODE_OPTIONS=--openssl-legacy-provider and then building the project again?

NotTheRealTWCH commented 2 years ago

That worked. I'm on npm version 8.5.2 and node 17.7.2 by the way.

bootsie123 commented 2 years ago

Awesome, glad that worked for you! This reminds me, I should probably update my node version to the LTS version. I think I'm using 12 or 14 right now