I am trying to create a MERN-based tinder app but faced error in the very first command. When I ran 'npx create-react-app tinder' in VS code terminal, I got this error message -
npx : The term 'npx' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ npx create-react-app tinder
+ ~~~
+ CategoryInfo : ObjectNotFound: (npx:String) [], CommandNotFoundException
I have Node.js installed on my system. Below are two things I have tried, but they didn't work.
I tried running
node -v
in VS Code terminal to check if VS Code is able to recognize Node.js. But on running this command, I got the following error message:node : The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + node -v + ~~~~ + CategoryInfo : ObjectNotFound: (node:String) [], CommandNotFoundException
Note that on running version commands for Node and NPM on Windows PowerShell and command prompt, I am able to see their versions as output (v16.18.0 and 8.19.2 respectively) confirming their presence in my system.
Nonetheless, I tried running
npm install -g create-react-app
command in VS Code terminal next and the following is what I got:npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + npm install -g create-react-app + ~~~ + CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
I suspect that this problem may be due to some path setting that I need to do correctly. My folder named 'tinder' and Node.js are in different drives (Tinder is in E drive and Node.js is installed in C drive). Is that the reason for error?