Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npx create-react-app fails because of core-js update. #8660

Closed
miteshkumar77 opened this issue Mar 16, 2020 · 5 comments
Closed

npx create-react-app fails because of core-js update. #8660

miteshkumar77 opened this issue Mar 16, 2020 · 5 comments

Comments

@miteshkumar77
Copy link

Describe the bug

When I run npx create-react-app client, it terminates while trying to update core-js, and
core-js does not update properly.

Did you try recovering your dependencies?

C:\mitesh\javascriptcode\calendar>npm --version
6.14.2

Which terms did you search for in User Guide?

I did not find anything similar to my output.

Environment

C:\mitesh\javascriptcode\calendar\client>npx create-react-app --info
Environment Info:

  current version of create-react-app: 3.4.0
  running from C:\Users\kumarm4\AppData\Roaming\npm\node_modules\create-react-app

  System:
    OS: Windows 10 10.0.18363
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  Binaries:
    Node: 12.16.1 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 6.14.2 - C:\Users\kumarm4\AppData\Roaming\npm\npm.CMD
  Browsers:
    Edge: 44.18362.449.0
    Internet Explorer: 11.0.18362.1
  npmPackages:
    react:  16.13.0
    react-dom:  16.13.0
    react-scripts: Not Found
  npmGlobalPackages:
    create-react-app: Not Found

Steps to reproduce

  1. Go to working directory. Run npm install create-react-app -g
  2. Run npx create-react-app client
  3. cd client
  4. npm version core-js

Expected behavior

create-react-app client will finish and tell you to cd
into client directory.

npm version core-js will display version of core-js

Actual behavior

npx create-react-app client gives me the following output:

C:\mitesh\javascriptcode\calendar>npx create-react-app client

Creating a new React app in C:\mitesh\javascriptcode\calendar\client.

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


> [email protected] postinstall C:\mitesh\javascriptcode\calendar\client\node_modules\babel-runtime\node_modules\core-js  > node -e "try{require('./postinstall')}catch(e){}"

Microsoft Windows [Version 10.0.18363.720]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\mitesh\javascriptcode\calendar\client\node_modules\babel-runtime\node_modules\core-js>

It places me in core-js folder.

Then npm install -g core-js gives me the following output:

C:\mitesh\javascriptcode\calendar\client>npm view core-js version
3.6.4

C:\mitesh\javascriptcode\calendar\client>npm install core-js -g

> [email protected] postinstall C:\Users\kumarm4\AppData\Roaming\npm\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"

Microsoft Windows [Version 10.0.18363.720]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\kumarm4\AppData\Roaming\npm\node_modules\core-js>

Reproducible demo

To reproduce, do npm create-react-app client.
Then corrupt your core-js dependency in %appdata%/npm/node_modules/core-js.
(Note. I didn't corrupt my dependency myself.)

npx create-react-app client gives me the following output:

C:\mitesh\javascriptcode\calendar>npx create-react-app client

Creating a new React app in C:\mitesh\javascriptcode\calendar\client.

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


> [email protected] postinstall C:\mitesh\javascriptcode\calendar\client\node_modules\babel-runtime\node_modules\core-js  > node -e "try{require('./postinstall')}catch(e){}"

Microsoft Windows [Version 10.0.18363.720]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\mitesh\javascriptcode\calendar\client\node_modules\babel-runtime\node_modules\core-js>

It places me in core-js folder.

Then npm install -g core-js gives me the following output:

C:\mitesh\javascriptcode\calendar\client>npm view core-js version
3.6.4

C:\mitesh\javascriptcode\calendar\client>npm install core-js -g

> [email protected] postinstall C:\Users\kumarm4\AppData\Roaming\npm\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"

Microsoft Windows [Version 10.0.18363.720]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\kumarm4\AppData\Roaming\npm\node_modules\core-js>
@stale
Copy link

stale bot commented Apr 17, 2020

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Apr 17, 2020
@atwdeali
Copy link

Abosnd02

@stale stale bot removed the stale label Apr 17, 2020
@stale
Copy link

stale bot commented May 17, 2020

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label May 17, 2020
@stale
Copy link

stale bot commented May 22, 2020

This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.

@amispam
Copy link

amispam commented Sep 17, 2021

Though I am using Linux, I am facing exactly same problem. npx create-react-app, it seems always goes far deprecated core-js.

First I thought it was a issue due to package installer (like yarn, npm etc.) But after using many package installers I came to the conclusion that this issue is completely related to 'create-react-app'.

So far I've not been able to find any reasonable solution for it and it is highly likely that this is internal bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants