So when I try to create a react app using yarn I am facing this error. I don't understand why I am receiving this, this is my first time using yarn. It would be great if you could guide me through I want to create a react app with yarn. I face no issues when running npx command.
From the screenshot, it can be seen that it is due to the space in your Windows user name - Adil Asif. Command prompt takes whatever before Adil in the path as command and rest from Asif as arguments, instead of yarn as command and create-react-app client as argument.
You could try using NPM or check the corresponding github issue. You can also create project in another drive if available or in the root folder of C: drive.
Github issue and fix
Related
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
Wanted to create a new react app, and ran both npx create-react-app and init react-app command in my Mac terminal but it's not working.
Tried a couple of times, but sometimes the folder is created with a package.json file only. Then everything stopped downloading. What could be the issue?
Screenshot of the output in the terminal:
According to your screenshot, there is no problem when you initialize your react project.
I think your local network may not be good enough. To create a react app, you need to install many third-party nodes_modules then cause mistakes.
Therefore, you can try to change the npm source, such as taobao( https://registry.npm.taobao.org )
npm config set registry xxx
And then use the craete-react-app to initialize the app.
Trying to fork pancakeswap from https://github.com/pancakeswap/pancake-frontend.
Steps what I did,
Clone Repo
Run npm install command
Run npm start command
Solve some no-used props error by commenting that props. After that also 2 errors are still in application.
Error1: JSX props should not use functions react/jsx-no-bind
Error2: defaultProp "expanded" has no corresponding propTypes declaration react/default-props-match-prop-types
Help me to solve this. Stuck more than 5 days. Searched many pages but no use. Most of them are suggested to change jsx functions. Is there is any simple way to solve these errors?
I did the same yesterday and it worked. There are still some elements that I need to figure out, but to make it running on localhost wasn't hard.
Before running pancakeswap frontend we need to have nodejs installed. Should work with any version 16, my was v16.14.0. Second is to have installed yarn as they don't use npm. This we know because the project has yarn.lock file. Third is have nextjs installed globally like yarn. With this we should be able to install and run the app.
Next steps would be:
Clone repo or just download it, will work as well
Run yarn install command (or just yarn - works the same)
Run yarn build (this will call next build)
Run yarn start (this will call next start)
After last step the app should start on localhost:3000
This is what I did and it worked. Keep in mind that this is valid for the current version and could change in future.
I finished setting up node v13.14.0 on my windows 7 laptop then did "npm react-create-app name". After done downloading I was greeted with this error...
Image of my error
I tried searching it on stackoverflow there was a solution about webpack.config.js but I couldn't find it on my folder section.
vscode-folder-structure
Any idea, should reinstall ?
I got around this by creating a new user in windows (I found the solution on github comments somewhere ), then logged in as that user and installed "npx create-react-app app-name" and it worked somehow ¯_(ツ)_/¯.
enter image description here
If you are installing then use npm i create-react-app. If you are trying to creating react app then use npx create-react-app appname. If you have another issue then please elaborate on that issues.
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)