Skip to content

Can't create react app with npx or yarn #12592

Open
@Tobi-davies

Description

@Tobi-davies

I am unable to create new react projects with npx or yarn. I'm also unable to install necessary dependency packages into existing react projects.
I got this error:

$ npx create-react-app new-fr

Creating a new React app in C:\Users\HP\Desktop\side-projects\fresh\new-fr.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

npm ERR! code UNKNOWN
npm ERR! syscall mkdir
npm ERR! path C:\Users\HP\AppData\Local\npm-cache_cacache\index-v5\ab\02
npm ERR! errno UNKNOWN
npm ERR! Invalid response body while trying to fetch https://registry.npmjs.org/@babel%2fplugin-transform-react-jsx: UNKNOWN: unknown error, mkdir 'C:\Users\HP\AppData\Local\npm-cache_cacache\index-v5\ab\02'

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\HP\AppData\Local\npm-cache_logs\2022-07-16T09_58_49_000Z-debug-0.log

Aborting installation.
npm install --no-audit --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.

Deleting generated file... package.json
Deleting new-fr/ from C:\Users\HP\Desktop\side-projects\fresh
Done.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions