Can't get Gatsby CLI to work correctly

I’m new to this. I’m a designer learning to code. I was able to start a Gatsby project fairly easily on my Macbook pro. I backed up my project to Github because I need to continue working on the website from my PC (Windows 10).

And now I’m absolutely livid because I cannot get the Gatsby CLI to work on my PC.

I’ve tried to set up the development environment to be the same as before. I’ve installed VS Code. I’ve installed nodejs and npm. The CMD prompt return versions for both.

I use npm to install Gatsby and it looks like it works, but then it keeps saying " ‘gatsby’ is not recognized as an internal or external command, operable program or batch file."

I’ve checked and edited the path under system environment variables, as this was the only answer I could find online.

Nothing works. I don’t know if the issue is just related to things being in the wrong directories or something else entirely.

Nodejs is installed in Program Files. Inside that, the node_modules directory contains npm. Inside npm is another node_modules (is that the way it should be?). Like this:

C:\Program Files\nodejs\node_modules\npm\node_modules\gatsby-cli

I don’t understand why I can’t get Gatsby CLI to work. Nor do I understand why this is so difficult to find the answer.

Please help.

This topic can be marked as solved because I’ve simply decided to not use Gatsby or Netlify at all.

thanks for sharing this.