Off-Platform Project: RESTful Restaurants - Boilerplate error

Hi all,

I am trying to do the off-platform project for the restaurants (https://www.codecademy.com/content-items/adf6a0dee5abf33f002707e9647446df), but I keep getting an error with the boilerplate provided by Codecademy. It seems that Nodemon is not recognized. I have tried to install the dependencies from the solution folder, but I keep getting the same errors. I even tried running the solution code, but the error persisted.

Can somebody help me?

Have you first navigated to the backend folder before running ā€œnpm installā€ ? I just tested it and it worked for me. The front-end part wouldn’t run for me actually without tweaking some things. Tag me if you need help with the front end.

Hi,

Thanks for taking your time. Yes, I confirm that I have run ā€œnpm installā€ in the back end, and I am still getting the same error. I am not sure what is causing it, but it seems to be related to the nodemon library.

Could you provide a larger screenshot (Or more of them) of the terminal that includes the command you wrote? A little more context could be helpful.

Hi, the frontend wouldn’t run for me, may I know what things did you tweak to make it running?

Sure. The project was created with an older version of Node that has some breaking changes with the new versions. So basically, I did 2 things:

  1. I ran npm update to update the packages to more recent versions. I did not use --force because that can cause breaking changes
  2. I altered the start script in package.json by adding --openssl-legacy-provider as an argument to react-scripts

So the scripts section ended up like this:

"scripts": {
    "start": "react-scripts --openssl-legacy-provider start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },

Hi,
Sure thing. These are he steps that I am following:

  1. I downloaded the code provided by CodeCademy. I unzipped the file and open a folder in VScode pointing to the the unzipped file.

  2. I used the terminal to change the folder to /starting-code/backend

  3. Here, I ran ā€˜npm install’. I got the following warnings:

  4. I opened a new terminal and changed directory to /starting-code/frontend. I ran agan the ā€˜npm install’ for the front end. I also got a bunch of warnings:

  5. Backn into the folder of the backend, I execute ā€˜npm start’. This is the error I am getting:

I dont know if you might need it, but when I run ā€˜npm list g’ I am getting the following libraries:
image

Let me know if there is any other information that you might need.
:slight_smile: Thanks again!

I have a hunch that your directory name could be throwing off MINGW. Notice how the error message lists the directory starting with ā€œbackā€ which occurs directly after the ampersand (&) character. I wonder if it would work if you renamed that folder. Or you could try PowerShell instead of MINGW. The basic commands are the same. I don’t have MINGW installed, so I can’t test it, but PowerShell works for mine even after I inserted an & into my directory.

I am crying, man​:smiling_face_with_tear::smiling_face_with_tear:!!!
You were right! Thanks for taking your time; I really appreciate it.

1 Like

No problem. I’m glad you got it sorted out now!