i keep getting this error when i type this command as instructed in the course. Im new to node and javascript so I don’t know what this error means. its not creating a folder called hello world in the react file. what should I do?
Hi @narayana_m ,
Please make sure you have installed Nodejs please check the installation using the command
npm -v , this command will show you the version of your Nodejs , if nothing shows up try installing the Nodejs.
Also try running PowerShell as an administrator and then try the npx create-react-app
command again.
Please make sure your Nodejs installation path is set in your Environment variables.
To check:
- Open System Properties > Environment Variables.
- In the System Variables section, find the
Path
variable, select it, and click Edit. - Ensure that the path to your Node.js installation (usually
C:\Program Files\nodejs\
) is included. - If it is not present, add it manually by clicking New and pasting the path.
If you still face any issue, please feel free to ask us.
Hi @narayana_m,
Please try the following steps:
1.Open PowerShell as Administrator and run: npm cache clean --force
2. Next run this command: npm install -g npm
3. Open File Explorer
4. In the address bar of File Explorer, type the following path and press Enter: C:\Users\mahat\AppData\Roaming
5. If you can’t see the AppData
folder, it might be hidden. You can make it visible by following these steps:
* In File Explorer, click on the “View” tab.
* Check the box labeled “Hidden items.”
6. Once inside the Roaming
folder, look for a folder named npm
.
7. If the npm
folder doesn’t exist:
- Right-click inside the
Roaming
folder. - Select New > Folder from the context menu.
- Name the folder
npm
.
- Additionally, check for the
npm-cache
folder insideC:\Users\mahat\AppData\Local\
. If it’s missing, repeat the same process to create it:
- Navigate to
C:\Users\mahat\AppData\Local\
. - Right-click and select New > Folder.
- Name the folder
npm-cache
.
9.Retry command:
npx create-react-app hello-world
If you still face any issue, please feel free to ask us.
problem has been solved, thanks
!