Stuck with the installation of React.js - reactjs

While installing React.js, I am getting stuck here. I've referred to the previous questions regarding the same. But couldn't find a solution. Even after uninstalling and reinstalling, I am unable to solve this issue. Also, I am not getting an index.js file after the installation. Someone guide me.

based on the image, you didn't go to the todo directory.
npx create-react-app todo
cd todo
npm start

Open an completly empty folder in a terminal and type npx create-react-app .

Related

npx create-react-app my-app yield result 'create-react-app' is not recognized

I tried to use the 'npx create-react app [project name]' in my project folder but it produced this error
This happened after I deleted the create-react-app.cmd in my C:\Users[myname]\AppData\Roaming\npm folder.
I deleted the file because I had a different problem before where I used the same command but produced "module not found". So someone suggested me to delete the create-react-app.cmd file in my roaming/npm folder. even before doing this, I have tried uninstalling global create-react-app based on the create react app repo.
So was the deletion of create-react-app.cmd the cause to my problem? if so, what should I do to have that file back?
npx came with NPM, so with nodejs.
Uninstall and reinstall nodejs will fix the problem.
Add npm i create-react-app command before that command, and it will fix the problem.

React: Module parse failed

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.

npx create-react-app is not creating servicework.js file in src forlder

I am trying to learn building PWAs and have been reading about this concept for the past few days. The problem I am facing is; whenever create a new react app with the help of npx, it never creates a serviceworker.js file.
Files after creating a new react project
All the articles and the YouTube tutorials show that npx create-react-app is creating that file for them. I have tried to google this issue but I think I am the only one who is facing this problem. I assume I can create a serviceworker.js file myself but I am curious that why npx is not doing this for me. I have tried to reinstall everything, tried to update everything but nothing is helping.
You have to install it with a pwa template:
npx create-react-app my-app --template cra-template-pwa
Then it's in the src folder.
Make sure you have the latest node version installed for that.

SCSS compilation issue in #material/button/_mixins.scss

issue-screen-shot
I'm getting this issue it's quite troublesome can anyone please help me out reagarding this issue...
I'm getting this issue when trying to build my react project.
build script screen-shot
node-sass already addedd
To get MDC React Components to work with create-react-app you need to set a SASS_PATH environment variable that points to your node_modules directory. To quickly do this on OS X or Linux enter the following in your command line:
export SASS_PATH=./node_modules
If you're on Windows use the following:
SET SASS_PATH=.\node_modules
Rename your src/App.css file to src/App.scss.
You will also need to install node-sass:
npm install node-sass

Error: Cannot read property 'UIAppFonts' of null

When running react-native link it gives this error,
It says,
rnpm-install ERR! It seems something went wrong while linking. Error: Cannot read property 'UIAppFonts' of null
I had this exact same problem. I had accidentally deleted by Info.plist file in my ios directory. Restoring it, fixed my issue.
I had same issue not quite long, running react-native links will give you error.
If you are using yarn simply run:
yarn remove react-native
yarn add react-native
Then run react-native link
This fixed it for me.
I had this problem and in my case it was because I had renamed the project but forgotten to update newname in a few folders and files.
In case anyone runs across this, this is how I fixed the react-native linking issue w/ UIAppFonts:
# Regenerates ios files
react-native upgrade
# Works now
react-native link
Basically, it's pretty similar to the answer that Matt posts above, except I didn't know how to restore it.

Resources