404: Page Not Found!

Stranded Without a Single Express Route


Greetings, Moonbats and other denizens of the hoary old Interwebs! Harken yea to my tale of woe!

Urgh! I've been working with the Express, React and Node.js (ERN) stack for both back-end API and front-end client/consumer. I must say that, after several months, I'm not impressed with it by any means. The problem I have with using JavaScript to write code is that it often fails silently (with no warning or error messages) and makes bugs really hard to track down, let alone solve. This is also true of ERN, since these technologies are based on JavaScript.

As it stands, the back-end server is not mapping functions to routes at all, so I keep getting 404 (Page Not Found) errors when I try to access API endpoints (with and without parameters). I have no idea why (or where) the failure is happening, since there are no error messages in either the log file or console output for the back-end. I've put in console.log () statements at various points in server.js and they all execute, so the problem doesn't seem to be there, and yet it seems to silently ignore the route mapping code for some reason. I've tried excluding various app.use () mappings (all but one) to no avail. I've picked through the controller and routing code files and not found any bugs. I've even put the code through Claude AI and got back nothing useful in diagnosing or resolving the issue. I'm fresh out of ideas and can't get any work done until the issue's solved.

Of course, using AI to write code is all well and good when it works, but when it doesn't, it can be hard to debug (and take just as long as the time saved by using it in the first place). The problem I have with AI is that it's just like magic: It doesn't explain itself or its methodology unless explicitly told to. It can still fail spectacularly. It also has to be given precise instructions to get it to produce output that is sort of right (but still requires tweaking).

I guess I'll just have to go back to reading A Canticle for Liebowitz until somebody rescues me. Either that or look for alternative employment.

How do you rate this article?

7


Great White Snark
Great White Snark

I'm currently seeking fixed employment as a S/W & Web developer (C# & ASP .NET MVC, PHP 8+, Python 3), hoping to stash the farmed fiat and go full Crypto, quit the 07:30-18:00 grind. Unsigned music producer; snarky; white; balding; smashes Patriarchy.


Return to the Source
Return to the Source

Use the Force; read the source! This blog is mostly a collection of study notes on ASM, ASP .NET, Blender, BASIC, C/C++, C#, ChucK, Computer Architecture, Computer Literacy, CSS, Digital Logic, Electronics, F#, GIMP, GTK+, Haskel, Java, Julia, JavaScript (ES6+) & JSON, LISP, Nim, OOP, Photoshop, PLAD, Python, Qt, Ruby, Scheme, SQL (MySQL & SQLite), Super Collider, UML, Verilog, VHDL, WASM, XML. If I can learn it and make notes on it, I'll write about it. || Blog images copyright Markus Spiske and Pixabay

Publish0x

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.

Page not displaying correctly?