React Installation (npm ERR! SELF_SIGNED_CERT_IN_CHAIN) - node.js

I'm trying to run my first React application.
I've installed Node.js/npm.
I tried executing the command "npx create-react-app my-app" as per the tutorial on https://reactjs.org/docs/create-a-new-react-app.html
I also tried another command "npm install -g create-react-app#1.5.2", but there seems to be an error.
Please refer to the image-
commands executed on cmd
I have watched multiple installation guides and video tutorials but nothing seems to work.
Please help me out!

Try to update npm
npm install npm -g --ca NULL
and then tell npm to use know registrars for SSL cert verification with
npm config set ca=""

Related

react app is successfully created, but npm start throws an error

I installed the latest nodejs 19.2.0 on my windows 11 OS rather than the recommended for most users 18.12.1
npx create-react-app my-first-app works just fine, it creates all the files and folders without any errors, shows happy hacking message as well, recommends to use npm start command. I go inside my-first-app folder, go npm start and I get a module not found error...like this picture
Error Message Screenshot
In youtube tutorials, there is no any error in their pc. npm start runs just as easily as npx create-react-app <anyappname>.
F:\Tutorial & Practice\Frontend development\React Projects\my-first-app. With this path to your project, I can see there is an & symbol in the Tutorial & Practice directory. Sometimes that might cause error. Try renaming the directory without any symbols or even spaces, just to be sure. Then run npm start. And if that still doesn't work delete the node_modules folder and then npm install again and see if that works.
Try this first:
npm install react-scripts
If the error wasn't solved, then try this:
rm -rf node_modules
npm cache clean -f
npm install
npm install react-scripts

I can't create a template using create-react-app. getting the error message: a template was not provided. or ERROR 404

It's been many days that I am completely stuck and not able to create a react app with npx create-react-app my-app. I went through many Stakeoverflow conversations and tried in different ways but I keep on getting error messages : erro404 or error code1 or a template was not provided, and never succeed to create a template.
I've uninstalled and reinstalled Node version 16.13.1, my npm version is 8.1.2. 
I've tried : 
npm uninstall -g create-react-app 
npm install -g create-react-app
npm cache clean
npm rebuild
npm cache clean --force
npx clear-npx-cache
npm audit npm audit fix
npx create-react-app my-app --template[template-name]
npm config set registry http://registry.npmjs.org 
sudo npm i -g create-react-app
I also checked the npm status on  https://status.npmjs.org/ and everything looks normal .
I don't know what else to try.
Do you have any idea of how I can fix it?
I think you misread the syntax for the command line arguments. From CRA:
You can now optionally start a new app from a template by appending --template [template-name] to the creation command.

node js npm package installation not completed

I try to install node js npm packages, but It start to install and unfortunately freezes. I also try to install angular packages and it doesn't any problem. please help to fix this issue.
node version is 12.13.1;
npm version is 6.12.1;
I tried to install packages this way
npm i html-to-xlsx
here is a result:
another installation result:
Try the following commands then re-run the command:
npm cache clean --force
npm cache verify
And make sure you are in a place with good internet connection. Sometimes this is the issue.
I found way to fix this issue. I add -g before package name
npm install -g html-to-xlsx
Everything looks good
After that I enter this path C:\Users{USERNAME}\AppData\Roaming\npm\node_modules and copy needful module into my working folder

Npm commands downloaded but not recognize

So I recently update node js pretty much since I was gonna try Angular but now when I try to run any command like create-react-app appname I start to get this.
C:\Users\Mine\AppData\Roaming\npm/node_modules/node/bin/node: line 1:
This: command not found
now I checked my Environmental variables and on top of my Path folder I have
C:\Users\Mine\AppData\Roaming\npm which im pretty sure is the correct
path.
I've tried to change the path to programfiles\node and it did not work as well.
i think you should after update node js uninstall create-react-app
npm uninstall create-react-app
npm uninstall -g create-react-app
npm cache clean --force
at the next
npm install -g create-react-app
Once installation successful, try running
npx create-react-app hello-world
Note
npx on the first line is not a typo — it’s a package runner tool that
comes with npm 5.2+.

npm node_modules command not found on ubuntu

I've got a problem starting npm modules f.e. ionic, cordova, protractor. When I write something f.e.like:
ionic serve
It response with:
zsh: command not found: ionic
I installed these modules globally npm install -g ionic and locally npm install ionic, but the output is still the same. Also I tried to run them locally in directory ./node_modules/.bin/ again the same result. Another thing, that I've tried to change path of installation like here Cannot run ionic. receives "No command 'ionic' found", but didn't get the needed result. I still think, that the reason is in path, that npm installs modules, in my case it's ~/npm/bin. Thanks in advance.
Try using bash and running the same command.

Resources