0

I am trying to create a React project when using npx or using yarn always freezes,

this is the CMD part when using the npx:

D:\React_Redux_Course\React Projects>npx create-react-app my_app_test --use-npm
npx: installed 98 in 50.461s

Creating a new React app in D:\React_Redux_Course\React Projects\my_app_test.

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


> [email protected] postinstall D:\React_Redux_Course\React Projects\my_app_test\node_modules\babel-runtime\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"


> [email protected] postinstall D:\React_Redux_Course\React Projects\my_app_test\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"


> [email protected] postinstall D:\React_Redux_Course\React Projects\my_app_test\node_modules\core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"

+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
added 1624 packages from 750 contributors and audited 1628 packages in 1030.934s

58 packages are looking for funding
  run `npm fund` for details

found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details

and freezes when using yarn command aswell as the below cmd:

D:\React_Redux_Course>yarn create react-app setup-antd-first
yarn create v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...

success Installed "[email protected]" with binaries:
      - create-react-app

Creating a new React app in D:\React_Redux_Course\setup-antd-first.

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

yarn add v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "react-scripts > @typescript-eslint/eslint-plugin > [email protected]" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 14 new dependencies.
info Direct dependencies
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
info All dependencies
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ @babel/[email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
Done in 212.18s.

I don't know where's the problem exactly may be there's still missing package need to install or something?

and for both I didn't find the src folder and always stuck or freeze as I explained...

Please give me some recommendation...

Edited:

this is a screen shot for meaning freeze:

Freeze

and this is the project folder:

enter image description here

8
  • what means freezes? it looks like everything installed successful Commented Jun 18, 2020 at 12:29
  • It might possible that your folder does not have right permission... otherwise according to your code snippet it looks good and your react application is also created successfully. do check once. Commented Jun 18, 2020 at 12:31
  • @demkovych could you check edit I have just add n image may be explain what I mean with freeze Commented Jun 18, 2020 at 12:32
  • 1
    It might be helpful to you: github.com/yarnpkg/yarn/issues/4147 Commented Jun 18, 2020 at 12:35
  • 1
    or just check this thread: github.com/facebook/create-react-app/issues/8088 Commented Jun 18, 2020 at 12:35

1 Answer 1

1

Firstly you should remove your old version of create-react-app cli

Now do the following thing you can able to create your application.

  1. npm rm -g create-react-app
  2. npm install -g create-react-app
  3. npx create-react-app my-app

Note: When using correct create-react-app version, you will see an additional package cra-template

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

While previous versions show something like this:

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
Sign up to request clarification or add additional context in comments.

2 Comments

wow you saved my time bro thanks alot it solved finally
Cheers mate...!!!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.