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

can't create-react-app #4611

Closed
Cheizr opened this issue Jun 14, 2018 · 12 comments
Closed

can't create-react-app #4611

Cheizr opened this issue Jun 14, 2018 · 12 comments

Comments

@Cheizr
Copy link

Cheizr commented Jun 14, 2018

Environment = Windows 10

npx create-react-app projectname

Paste the output of the command in the section below.
-->

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

yarn add v1.6.0
info No lockfile found.
[1/4] Resolving packages...
warning react-scripts > jest > jest-cli > istanbul-api > istanbul-lib-hook@1.2.1: 1.2.0 should have been a major version bump
[2/4] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000855.tgz: ESOCKETTIMEDOUT".

Aborting installation.
yarnpkg add --exact react react-dom react-scripts --cwd C:\Users...\reduxpractice has failed.

Deleting generated file... package.json
Deleting generated file... yarn-error.log

@mrbusche
Copy link

Did you check your internet connection? Appears to be an issue with you not having internet or a proxy blocking access to the internet.

@akshathsramesh
Copy link

akshathsramesh commented Jun 14, 2018

Same here

yarn add v1.7.0
info No lockfile found.
[1/4] Resolving packages...
warning react-scripts > jest > jest-cli > istanbul-api > istanbul-lib-hook@1.2.1: 1.2.0 should have been a major version bump
[2/4] Fetching packages...
warning There appears to be trouble with our server. Retrying...
error An unexpected error occurred: "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz: Request failed "503 Service Unavailable"".
Aborting installation.

Deleting generated file... package.json
Deleting generated file... yarn-error.log

@kalbert312
Copy link

kalbert312 commented Jun 15, 2018

Same, WIndows 10 WSL, npm 6.1:

yarn add v1.6.0
(node:2656) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
info No lockfile found.
[1/4] Resolving packages...
warning react-scripts > jest > jest-cli > istanbul-api > istanbul-lib-hook@1.2.1: 1.2.0 should have been a major version bump
[2/4] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz: socket hang up".
info If you think this is a bug, please open a bug report with the information provided in "/mnt/..../yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.```

@EthanC
Copy link

EthanC commented Jun 15, 2018

Can reproduce, have yet to find a fix. Works fine with NPM.

Environment

  • Windows 10 1803 17134.112 x64
  • Node 8.11.3 or 10.4.1
  • Yarn 1.6.0 or 1.7.0 or 1.9.0-20180614.1132
  • Network: Wired, No Proxy, 20ms Ping, 94Mbps Download, 11Mbps Upload, 1.1.1.1 DNS

Attempted Fixes

  • Reinstalling Yarn and Node (multiple versions)
  • Admin Terminal (PowerShell)
  • Clearing Yarn and NPM Cache
  • Reinstalling (globally) create-react-app
  • Clearing DNS Cache
  • Restarting PC

Verbose Output

...
verbose 65.602 Performing "GET" request to "https://registry.yarnpkg.com/react/-/react-16.4.1.tgz".
verbose 65.603 Performing "GET" request to "https://registry.yarnpkg.com/react-dom/-/react-dom-16.4.1.tgz".
verbose 65.613 Performing "GET" request to "https://registry.yarnpkg.com/react-scripts-ts/-/react-scripts-ts-2.16.0.tgz".
info There appears to be trouble with your network connection. Retrying...
verbose 78.42 Performing "GET" request to "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz".
info There appears to be trouble with your network connection. Retrying...
verbose 96.48 Performing "GET" request to "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz".
verbose 112.552 Error: http://registry.npmjs.org/compression/-/compression-1.7.2.tgz: socket hang up
    at createHangUpError (_http_client.js:313:15)
    at Socket.socketOnEnd (_http_client.js:416:23)
    at Socket.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1081:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
error An unexpected error occurred: "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz: socket hang up".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\Ethan\\Documents\\Elite\\Frontend\\web\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Aborting installation.
  yarnpkg add --exact react react-dom react-scripts-ts --cwd C:\Users\Ethan\Documents\Elite\Frontend\web --verbose has failed.

Deleting generated file... package.json
Deleting generated file... yarn-error.log
Done.

@kwame101
Copy link

I had the same issue installing with windows but I just cloned the project with git clone <repo url> projectname.

@Cheizr
Copy link
Author

Cheizr commented Jun 17, 2018

Fixed, worked for me:

  • Uninstall the global module create-react-app
  • Clear npm cache
  • Reinstall create-react-app

Linking dependecies last like 40 min, but maybe it's only my hdd

@Cheizr Cheizr closed this as completed Jun 17, 2018
@EthanC
Copy link

EthanC commented Jun 17, 2018

Still an issue for me unfortunately, even after following those steps 😕

@NoiseEee
Copy link

This should not be marked closed, Yarn still fails.

@tzarebczan
Copy link

Could be related to this: #4588 (comment)

@massimopibiri
Copy link

"npm cache clean --force" solved my problem

@daliadefelipee
Copy link

Hi @NoiseEee. I think this issue was closed since the root of the problem was the antivirus software running as @tzarebczan stated in his link.

@IhsanMujdeci
Copy link

IhsanMujdeci commented Nov 22, 2018

npm uninstall -g create-react-app
npm uninstall -g yarn
npm cache clean --force
npm install -g create-react-app
create-react-app cool-projecy-name

Not sure if the uninstall of create-react-app and cache clean is needed but this is what worked for me.

@lock lock bot locked and limited conversation to collaborators Jan 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests