zsh: command not found: create-react-app (what does this mean?) - reactjs

why is this occurring? I've tried to set my path variable correctly but maybe I did it wrong and hope that's the reason zsh can't find the command "create-react-app" after installing it. I have very little experience in the terminal and am hoping someone can help me out.

On the command line you have to run npx create-react-app (for npm)
This is because when packages are installed globally, they are still just plain JavaScript. You need the npx command to run the installed package's code.

Related

Why is displaying 'command not found' by type 'npx create-react-app my-app' in terminal?

when I type npx-create-react-app my-app in terminal for creating my react project but that would tell me npx command not found ?showing error npx command not found in it
The fastest way to solve this issue:
npx clear-npx-cache
If the error is not resolved, you can force the command to use the latest version of 'create-react-app':
npx create-react-app#latest <app-name>
I think you might be facing issues due to following reason
Your username has space in between Raheel Ahmed, if possible you can create new user in windows and have username without space.
Powershell some time through error related to permission, if you cmd or best is git bash
You would need to have LTS version of Node.js installed, I think you might be having that.
I would recommend trying 2nd option first, that is installing git bash and try running the command there.
If that also does not work then give 1st option a try.

Error while running ‘hello-react’ program in react.js

With lots of issues while installing react.js finally when I thought that issues were resolved and everything is in a good place. I found this as a heartache issue.
Error description Image for reference:
Whenever you see this error, it means that something went wrong when you installed the dependencies.
The proper method to fix this error and install all the dependencies again can be found in this answer.
A quick workaround can be to install this specific dependency again using the following npm command:
npm intall react-scripts start
This will help you solve this issue. I still recommend you to install all the dependencies again so that you won't run into such issues later on.
Please mark this answer as accepted if it solves your issue.
Please execute the below-mentioned command.
npx i -g create-react-app
It takes few minutes and displays a message similar to below
We suggest that you begin by typing:
cd your-app-name
yarn start
Happy hacking!
cd into the your-app-name folder and execute npm start
Additional Reference: https://reactjs.org/docs/create-a-new-react-app.html

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

Create-react-app Command not found

I'm currently learning React. Every time I write create-react-app my-app, I get -bash command not found.
I've tried every single solution out there and still not working. Can anybody please help me? It's very frustrating.
Have you installed the creat-react-app CLI?
npm install -g create-react-app
If bash can't find it, you may just need to install it globally (-g) before you try to use it.

installed create-react-app without -g

I have installed create-react-app without -g
C:\Users\user1\projects\react>npm install create-react-app
but when I run
C:\Users\user1\projects\react>create-react-app my-app1
I get the following error
'create-react-app' is not recognized as an internal or external command, operable program or batch file.
can anyone please help me understand the role of -g flag
what if I dont want to install it globally?
How do I make it work without installing globally?
what if I dont want to install it globally?
How do I make it work without installing globally?
The package is designed to be installed globally. Please use it as intended.
If you don't want to permanently install it, in recent Node versions you can actually run it without installing through npx:
npx create-react-app my-app
If you have installed any npm module locally it will be stored in the .bin folder inside node_modules. To use this, you would have to reference node_modules/.bin/the binary to run. If installed globally, the module's binary will be stored wherever your OS stores executables that are run from the terminal, in Unix/Linux, for instance, it's usually something like /usr/bin(not absolutely sure). This is why installing something locally won't run by simply typing out its name in the terminal. Rather reference it absolutely like this node_modules/bin/the binary to run.

Resources