Step by step solution for npm install error

Skip till step-6 if you already know how to do it…

  1. Download the zip file.
  2. Unzip it on any directory on your computer/laptop.
  3. Open the folder, right click => more options => open in VSCode. [for win-11 users]
  4. Edit the dotenv-win/dotenv-unix file as told & save.
  5. Install NodeJS if not done already.
  6. Open a terminal in VSCode by pressing [CTRL] + [back quote] . :arrow_left: That’s the key left to your ‘1’ numkey. Run the following command: node -v to check if node is working. If you get back the version number then you’re ready to go!

  1. Delete the package-lock.json file & run npm install --legacy-peer-deps instead of npm install since this code is only for educational purpose so not updated & contain a lot of old stuff which will not work otherwise.
  2. If you see a lot of warning & error messages related to npm-gyp, run npm rebuild & this should fix the issue.
  3. Now run npm start. Your server should start at http://localhost:5000
  4. Visit the address to check the page. If everything is running properly, you can run your tests.
2 Likes

Hi @Vishal_Alkari,
Thank you so much for sharing this with us.

Thanks and Regards.
Sourabh Bagrecha,
MongoDB

1 Like

a heads-up warning: rebuilding will not work or may result in different on windows as one might not have installed compiler collections or other required libraries around.

2 Likes

Hey! Thanks for the response. I followed your replies to some previous users who faced the same situation.
I just built a structure around it so upcoming users can find the solution at one place.:v:t2:

1 Like