1

I was trying to install react, but it keeps saying aborting installation I'm using node v16-14-0 npm v6-14-11.

npx creat-react-app my-app
npx: installed 67 in 13.6s

creating a new react app in C:\User\adminstrator\my-app.
npm ERR! code ERR_OSSL_PEM_NO_START_LINE
npm ERR! error:0909006c:PEM routines:get_name:no start line

npm ERR! A complete log of this run can be found in:
npm ERR! C:User\adminstrator\my-app\_logs\2021-03-18T12_17_27_469Z-debug.log

Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-script cra-template has failed.
Deleting generated file... package.json
Ajeet Shah
  • 18,551
  • 8
  • 57
  • 87
mariamawit elzi
  • 11
  • 1
  • 1
  • 3
  • 1
    See [this post](https://stackoverflow.com/a/61100532/2873538) or [this](https://stackoverflow.com/a/56561186/2873538). Also, [this](https://github.com/npm/npm/issues/16116#issuecomment-288782409) – Ajeet Shah Mar 18 '21 at 12:51

3 Answers3

2

Try to delete .npmrc from C:\Users{username}. This worked for me.

Meghana
  • 21
  • 2
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 15 '22 at 11:11
1

I also got this kind of error before and uninstalling and deleting all node related files solved the problem.

1 - Uninstall nodejs from Programs & Features with the uninstaller.

2 - Delete these files:

C:\Program Files (x86)\Nodejs

C:\Program Files\Nodejs

C:\Users\{User}\AppData\Roaming\npm

C:\Users\{User}\AppData\Roaming\npm-cache

C:\Users\{User}\.npmrc (and possibly check for that without the . prefix too)

3 - Or you can do this

npm clear cache

then, again check for these files if they are not deleted and delete these files

C:\User\user\appdata\roaming\npm-cache

C:\User\user\appdata\roaming\npm

C:\User\user\appdata\Local\Temp

C:\programefile\nodejs

4 - go to this C:\User{user} and then unhide it if it was hidden and delete .npmrc file and delete all reated file to it(about 4 or 5 files)

5 - if it is uninstalled successfully (you can check with node --version) then reboot your computer

6 - Then, type this command

npm set registry http://registry.npmjs.org/ 

7 - and finally you're good to go

npx create-react-app app_name 
   or 
npm install <package-name>
Eyoba
  • 11
  • 2
0

i had the same problem when i tried to create new react app

solution: just go to this address << C:\Users\omar >> [omar is my user name for you its what your user name is] and at the bottom you would see a file with the name of << .npmrc >> and delete it

Adriaan
  • 17,741
  • 7
  • 42
  • 75