BUGS: Creating REST API Endpoints

I’ve been working through the Full Stack dev course and enjoying it a lot. However I tend to find a lot of the off-platform projects have issues with dependencies and modules. For the Creating REST API Endpoints section I found the bugs to be almost too many to work through.

  1. The @mui/lab module is missing from the package.json file and must be replaced with the solution version.
  2. The calendarComponent import statement in Booklist.js has the link as lowercase and that needs to be changed in order to compile correctly.
  3. After I got it to compile the calendar shows up for a second and then I got all these errors. As I moved through the course they did go away but I think it would be helpful to address the fact that there will be errors.
  4. Lastly, once completed with all the steps some of the functionality didn’t work like updating or being able to set the start and end times while creating a book even after replacing my code in the src/spi/books.js file with the solution code.

Hope this helps the future coders coming across these problems.


Thanks so much py2979376480, I managed to get through points 1 & 2 which you highlighted above and been spinning on point 3 thinking I had to resolve it before moving on to the rest of the project.

Your post here suggests, the errors in point 3 above (…which I’m also blocked by at the moment), is ‘the point’ of the project.
If so, I most certainly agree with you about codecademy making this clear to the student(s) completing the path. Especially as for newbies starting out (myself included) such an obstacle is majorly discouraging and while it may simulate a ‘real-world’ scenario, hopefully in the real-world one has a team to lean on and get un-stuck, which isn’t always the case studying alone online in the corner of the internet somewhere.

Finally completed the project/ exercise. Thanks for sharing here @py2979376480 for helping get me un-stuck.:pray:t5::+1:t5:

NB: For anyone attempting the exercise or stuck, it really is meant to take approx 50mins, you can literarily put your brain on snooze and follow the codecademy suggestions to resolve the issues mentioned above; although I imagine ‘understanding’ code and the techniques is partly the reason we’re all here.:sweat_smile: It gets well confusing sometimes. :see_no_evil:

1 Like

Thank you for the advice! I followed your suggestions #1 and #2, but I still can’t compile the front-end part. I keep getting an error message:

Failed to compile.
C:\Users\annie\Documents\Codecademy Exercises\creating-rest-api\starting-code\frontend\node_modules\react-scripts\scripts\start.js:19
throw err;

[Error: ENOENT: no such file or directory, stat ‘C:\Users\annie\Documents\My Pictures’] {
errno: -4058,
code: ‘ENOENT’,
syscall: ‘stat’,
path: ‘C:\Users\annie\Documents\My Pictures’

Does anyone else have the same issue? Why would React look for My Pictures??

I found that entering “npm audit fix --force” in the terminal resolved the issue

1 Like

It worked!! Thank you so much!

I cannot get over these fixes even with the npm audit fix --force and the above changes seems not to be working. can someone post the solution on git to diff?

1 Like

Regarding the 4th bug:
There are typos in solution, in the folder frontend/src/api/books.js
Names of the variables inside update function (‘updateBook’) are not correct. ‘title’ should be ‘newTitle’, ‘start’ should be ‘newStart’ and ‘end’ should be ‘newEnd’.
Thats because in the backend code ‘router.put’ is expecting req.body to have variables ‘newTitle’, ‘newStart’ and ‘newEnd’.