issues running npm/npm to create a react app - node.js

Hi guys im fairly new to coding, im having trouble with node npm, specifically creating a react app.
When i run npm init, it works but not npm/npx creat-react-app. i have even tried just running create-react-app just to see if it might work.
I have installed nodejs and pasted the path in my environment variables. i have tried npm, npx but no luck.
The error im getting is "npm ERR! code ERR_OSSL_PEM_NO_START_LINE"
"npm ERR! error:0909006C:PEM routines:get_name:no start line"
What could the issue be?
Its the first time i come across this issue.
Please help!!

Try
npm set registry http://registry.npmjs.org/
and again
npx creat-react-app my-app

Related

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.

How to fix ENOENT Error while installing React in WSL

I am trying to create a react app via WSL(windows subsystem for Linux), I am new to this technology, I am trying to create app in my D drive(/mnt/d). I have installed node using NVM, and it is working. But when I try to create an app using npx create-react-app I am getting ENOENT error, I was have been searching all over the internet from last day no luck so far, can anyone have a solution or show me what I am doing wrong. Attaching the error screenshot:
npx can be a bit weird around getting correct working directory context right. Try installing create-react-app globally ( npm i -g create-react-app ). Then try running it without npx.

React Installation (npm ERR! SELF_SIGNED_CERT_IN_CHAIN)

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=""

Getting started with Create React App - "Cannot find module"

I'm using the "Getting Started" guide because I've been experiencing endless errors trying to create a react app so far when following tutorials.
And straight away I'm running into a problem. When I run npx create-react-app my-app I get the following:
Cannot find module 'C:\Users\Aristophanes\node_modules\create-react-app\index.js'
Can anyone advise me what I'm doing wrong? Thanks.
This must be a problem related with your node installation (maybe you removed manually create-react-app package?). I'd recommend following these steps:
Uninstall node and npm
Delete the npm cache and npm modules in your machine (In Windows machine you can usually find them at C:\Users\ {username} \AppData\Roaming\npm-cache and C:\Users\ {user name} \AppData\Roaming\npm) respectively.
Install node and npm again
If you really don't want to delete node and npm, try step 2 and see if that works. Following these steps did the job for me, hope that helps you.
I think you might miss installing Node and npm in your machine.
I had same issue a few times. Every time I was searching thru net for a solution, and for every time i just typed in terminal
npm i node
and its just started working

Vue - npm install vue-custom-element giving Npm error

I have built a webpack-simple vue starter app.
I then tried to installed this. npm install vue-custom-element --save.
I am getting below error and don't have any idea whats happening here. Why its going for document-register-element package. Was working fine till 2 days before.
Please help for same.

Resources