Error while using 'new' command while creating a project in gatsby - reactjs

is the error I get while I'm trying to get a new starter project in gatsby.
node version: v14.4.0
npm version: 6.14.5
gatsby version: 2.4.17
Also, the error is the same while working with recent gatsby version.
Please help or suggest something.

git is not recognized as an internal or external command
You need to install git.
it seems you are using windows so install git on windows
You may need to close the cmd and open it again in order to use git.
Since windows may not automatically add git to your PATH environment variables:
Open Git Bash which should have been installed along with Git if you downloaded the correct installer.
Type the command you want to run, it should start with git.
Press enter.

Related

How Can I Download a React Project from Github and Run in My Laptop

I am new to Javascript and React. I was wondering if there is any way I can download some open-source projects written in React JS from GitHub and run them on my laptop with the help of sublime text. I was thinking to study the source code so that I can learn React.
I found some projects in Github but not sure how I can download the source code and run it.
Is there any step-by-step guideline? Can anyone help?
when I go to run an npm start on it, I get this error:
E:\Sem 04\Software project\React App\test001>npm start
education-academia#0.1.0 start
react-scripts start
'react-scripts' is not recognized as an internal or external command,
operable program or batch file.
you can copy that HTTPS link then in your console - git clone copied_url for this u have to install git in your lap
You can download a zip file => and extract that
after any of the methods, open the project folder => then console => npm install or yarn install (this installs all the project dependencies)

Not able to use a npm start from WSL ( UNC paths are not supported )

I am using WSL 2 on windows 11. When I am trying to use the termainl to create a react project it is giving me this error.
'\\wsl.localhost\Ubuntu\home\nisnym\t\learn'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
and here is the screenshot enter image description here
I also went through this already existing question, but it is not working for me. Question Link
If possible please help me fix this.
To be able to run and create react js apps.
–
node and npm install, I already did both installs enter image description here
Their latest version seems broken.
Even npx -y create-react-app#next does not seem to work with WSL2,
Try with 5.0.0:
npx -y create-react-app#5.0.0 testapp

How to run an existing REACT project

Beginner here, please help.
(1)If I have the files of a react project which was built on codesandbox or by another dev, how do I run the app and make changes in VSCode on my own machine.
(2)How do I run an existing personal create-react-app project on my machine, so as to continue buliding?
Open a terminal on vscode, then make sure you already node installed.
Type npm install after that npm run start or whatever command to run, you can see on package.json.
The first thing you need is to install updated version of nodejs, you can type to google “download nodejs” and make sure you download the stable version.
You need to open a terminal, also make sure you can locate your file path then type:
cd your file path: your-appName (this should be the name of your app)

React Js drag and drop github project not working

Environment:
OS: Windows 7, 64-bit
Tried to install github project react-drag-and-drop.
Followed procedure:
Downloaded project as zip and extracted into C:\xampp\htdocs\reactjs folder.
In command prompt, opened the folder location, C:\xampp\htdocs\reactjs\react-drag-and-drop-master.
Pasted and run the given command npm install react-drag-and-drop in command prompt.
Showing error as shown below:
How to solve the error and install that project..?
And also how to run the project in browser..?
Thanks in advance..
You are installing react-drag-and-drop module inside itself that's why it is giving the error.
Your third step should be npm install to download the required dependencies and after than run npm start.
This should work for you.

Why does the command " ionic serve " in git bash gives an error?

I'm trying to run an ionic server through git bash on windows but its failing and showing an error
Couldn't find ionic.config.json file. Are you in an Ionic project?
Here are all the possible solutions
From a recent update just rename the ionic.project to ionic.config.json
and install bower since ionic requires bower using npm i bower
and see to it that you are running command in your project folder only

Resources