Initialising create-react-app with a specific version of a package - npm

I am trying to initialise a create-react-app project.
Unfortunately this is failing when it attempts to fetch webpack-dev-server#3.1.14, as my company's internal NPM registry has decided that 3.1.14 has a vulnerability and so returns a 404.
How can I initialise create-react-app, and specify that it must use webpack-dev-server#3.1.13?
The following is the last 50 lines of the verbose output:
...
npm verb get http://myregistry:1234/jest not expired, no request
npm verb afterAdd c:\dev\npm-cache\eslint-plugin-react\7.11.1\package\package.json written
npm verb afterAdd c:\dev\npm-cache\jest\23.6.0\package\package.json not in flight; writing
npm verb correctMkdir c:\dev\npm-cache correctMkdir not in flight; initializing
npm verb cache add spec eslint#5.6.0
npm verb addNamed "5.6.0" is a plain semver version for eslint
npm verb addNameVersion registry:http://myregistry:1234/eslint not in flight; fetching
npm verb get http://myregistry:1234/eslint-plugin-flowtype not expired, no request
npm verb afterAdd c:\dev\npm-cache\jest\23.6.0\package\package.json written
npm verb afterAdd c:\dev\npm-cache\eslint-plugin-flowtype\2.50.1\package\package.json not in flight; writing
npm verb correctMkdir c:\dev\npm-cache correctMkdir not in flight; initializing
npm verb get http://myregistry:1234/webpack-dev-server not expired, no request
npm verb addRemoteTarball http://myregistry:1234/webpack-dev-server/-/webpack-dev-server-3.1.14.tgz not in flight; adding
npm verb addRemoteTarball [ 'http://myregistry:1234/webpack-dev-server/-/webpack-dev-server-3.1.14.tgz',
npm verb addRemoteTarball '60fb229b997fc5a0a1fc6237421030180959d469' ]
npm verb afterAdd c:\dev\npm-cache\eslint-plugin-flowtype\2.50.1\package\package.json written
npm verb get http://myregistry:1234/babel-core not expired, no request
npm verb get http://myregistry:1234/eslint not expired, no request
npm info retry fetch attempt 1 at 9:58:55 AM
npm info attempt registry request try #1 at 9:58:55 AM
npm http fetch GET http://myregistry:1234/webpack-dev-server/-/webpack-dev-server-3.1.14.tgz
npm verb afterAdd c:\dev\npm-cache\babel-core\7.0.0-bridge.0\package\package.json not in flight; writing
npm verb correctMkdir c:\dev\npm-cache correctMkdir not in flight; initializing
npm verb afterAdd c:\dev\npm-cache\eslint\5.6.0\package\package.json not in flight; writing
npm verb correctMkdir c:\dev\npm-cache correctMkdir not in flight; initializing
npm verb request uri http://myregistry:1234/webpack
npm verb request no auth needed
npm info attempt registry request try #1 at 9:58:55 AM
npm verb etag "3cb43ef0e59f247dfcf5f855611d5749"
npm http request GET http://myregistry:1234/webpack
npm verb afterAdd c:\dev\npm-cache\babel-core\7.0.0-bridge.0\package\package.json written
npm http fetch 404 http://myregistry:1234/webpack-dev-server/-/webpack-dev-server-3.1.14.tgz
npm ERR! fetch failed http://myregistry:1234/webpack-dev-server/-/webpack-dev-server-3.1.14.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 404
npm verb afterAdd c:\dev\npm-cache\eslint\5.6.0\package\package.json written
npm http 304 http://myregistry:1234/webpack
npm verb headers { 'x-powered-by': 'Sinopia/1.4.0',
npm verb headers etag: '"3cb43ef0e59f247dfcf5f855611d5749"',
npm verb headers 'x-status-cat': 'http://flic.kr/p/aXY3dH',
npm verb headers date: 'Tue, 22 Jan 2019 09:58:55 GMT',
npm verb headers connection: 'keep-alive' }
npm verb etag http://myregistry:1234/webpack from cache
npm verb get saving webpack to c:\dev\npm-cache\appduv03d1.machine.test.group_4873\webpack\.cache.json
npm verb correctMkdir c:\dev\npm-cache correctMkdir not in flight; initializing
npm verb cache add spec webpack#4.19.1
npm verb addNamed "4.19.1" is a plain semver version for webpack
npm verb addNameVersion registry:http://myregistry:1234/webpack not in flight; fetching
npm verb get http://myregistry:1234/webpack not expired, no request
npm verb afterAdd c:\dev\npm-cache\webpack\4.19.1\package\package.json not in flight; writing
npm verb correctMkdir c:\dev\npm-cache correctMkdir not in flight; initializing
npm verb afterAdd c:\dev\npm-cache\webpack\4.19.1\package\package.json written
npm info retry fetch attempt 2 at 9:59:05 AM
npm info attempt registry request try #1 at 9:59:05 AM
npm http fetch GET http://myregistry:1234/webpack-dev-server/-/webpack-dev-server-3.1.14.tgz
npm http fetch 404 http://myregistry:1234/webpack-dev-server/-/webpack-dev-server-3.1.14.tgz
npm ERR! fetch failed http://myregistry:1234/webpack-dev-server/-/webpack-dev-server-3.1.14.tgz
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 404

what is the error showing
simple way:if i am getting you
1.create-react-app my-app
2.cd my-app
3.npm i webpack-dev-server#3.1.13
4.if high severity vulnerability comes in just run npm audit fix to fix them, or npm audit for details
if any dependencies are migrated or has problem within you will find the solution in terminal msg,

i think it will work
$ npm set registry https://registry.npmjs.org
than clean cache
$ npm cache clean
$ npm rebuild
or it could be proxy server issue
try other internet connection

Related

npm install error "Cannot read property 'latest' of undefined"

I am trying to run the “npm install” command on an admittedly old version of npm and have run into the following issue, even after running “npm cache clean”, We are running version 1.3.6 because we are attempting to rebuild the existing software after a hardware failure. Any pointers would be appreciated.
npm WARN package.json ooi-ui#0.0.1 No repository field.
npm http GET http://registry.npmjs.org/videojs-wavesurfer
npm http 200 http://registry.npmjs.org/videojs-wavesurfer
npm http GET http://registry.npmjs.org/videojs-wavesurfer/-/videojs-wavesurfer-2.11.0.tgz
npm http 200 http://registry.npmjs.org/videojs-wavesurfer/-/videojs-wavesurfer-2.11.0.tgz
npm http GET http://registry.npmjs.org/video.js
npm http GET http://registry.npmjs.org/wavesurfer.js
npm http 200 http://registry.npmjs.org/wavesurfer.js
npm http GET http://registry.npmjs.org/wavesurfer.js/-/wavesurfer.js-4.2.0.tgz
npm http 200 http://registry.npmjs.org/wavesurfer.js/-/wavesurfer.js-4.2.0.tgz
npm http 200 http://registry.npmjs.org/video.js
npm http GET http://registry.npmjs.org/video.js/-/video.js-7.10.2.tgz
npm http 200 http://registry.npmjs.org/video.js/-/video.js-7.10.2.tgz
npm http GET http://registry.npmjs.org/babel/runtime
npm http GET http://registry.npmjs.org/videojs/http-streaming/2.2.4
npm http GET http://registry.npmjs.org/videojs/xhr/2.5.1
npm http GET http://registry.npmjs.org/global/4.3.2
npm http GET http://registry.npmjs.org/keycode
npm http GET http://registry.npmjs.org/safe-json-parse/4.0.0
npm http GET http://registry.npmjs.org/videojs-font/3.2.0
npm http GET http://registry.npmjs.org/videojs-vtt.js
npm http 200 http://registry.npmjs.org/keycode
npm http GET http://registry.npmjs.org/keycode/-/keycode-2.2.0.tgz
npm http 200 http://registry.npmjs.org/safe-json-parse/4.0.0
npm http GET http://registry.npmjs.org/safe-json-parse/-/safe-json-parse-4.0.0.tgz
npm http 404 http://registry.npmjs.org/videojs/http-streaming/2.2.4
npm http 200 http://registry.npmjs.org/global/4.3.2
npm http 405 http://registry.npmjs.org/babel/runtime
npm http GET http://registry.npmjs.org/global/-/global-4.3.2.tgz
npm ERR! TypeError: Cannot read property 'latest' of undefined
npm ERR! at next (/usr/lib/node_modules/npm/lib/cache.js:687:35)
npm ERR! at /usr/lib/node_modules/npm/lib/cache.js:675:5
npm ERR! at saved (/usr/lib/node_modules/npm-registry-client/lib/get.js:148:7)
npm ERR! at /usr/lib/node_modules/graceful-fs/polyfills.js:133:7
npm ERR! at Object.oncomplete (fs.js:108:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 2.6.32-754.33.1.el6.x86_64
npm ERR! command "node" "/usr/bin/npm" "install"
npm ERR! cwd /var/ooiui/ooi-ui
npm ERR! node -v v0.10.48
npm ERR! npm -v 1.3.6
npm ERR! type non_object_property_load
npm http 200 http://registry.npmjs.org/keycode/-/keycode-2.2.0.tgz
npm http 200 http://registry.npmjs.org/videojs-vtt.js
npm http 200 http://registry.npmjs.org/safe-json-parse/-/safe-json-parse-4.0.0.tgz
npm ERR! Error: No dist in undefined package
npm ERR! at next (/usr/lib/node_modules/npm/lib/cache.js:746:26)
npm ERR! at /usr/lib/node_modules/npm/lib/cache.js:739:5
npm ERR! at saved (/usr/lib/node_modules/npm-registry-client/lib/get.js:148:7)
npm ERR! at /usr/lib/node_modules/graceful-fs/polyfills.js:133:7
npm ERR! at Object.oncomplete (fs.js:108:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 2.6.32-754.33.1.el6.x86_64
npm ERR! command "node" "/usr/bin/npm" "install"
npm ERR! cwd /var/ooiui/ooi-ui
npm ERR! node -v v0.10.48
npm ERR! npm -v 1.3.6
npm http GET http://registry.npmjs.org/videojs-vtt.js/-/videojs-vtt.js-0.15.2.tgz
npm http 404 http://registry.npmjs.org/videojs/xhr/2.5.1
npm http 200 http://registry.npmjs.org/global/-/global-4.3.2.tgz
npm http 200 http://registry.npmjs.org/videojs-vtt.js/-/videojs-vtt.js-0.15.2.tgz
npm http 200 http://registry.npmjs.org/videojs-font/3.2.0
npm http GET http://registry.npmjs.org/videojs-font/-/videojs-font-3.2.0.tgz
npm http 200 http://registry.npmjs.org/videojs-font/-/videojs-font-3.2.0.tgz
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/ooiui/ooi-ui/npm-debug.log
npm ERR! not ok code 0
It seems pretty clear that the "404" error code means that npm is not finding the package from the registry. Is this a show stopper, or is there a way forward? Thanks in advance.
The TL;DR on this is update to npm#2.
npm 1.3.6 is 7 years old as of this writing. It is long out of support and the probability that it is incompatible with the current registry is very high.
In comparison, I notice you're running Node.js 0.10.48 which is "only" four years old. And while it too is long out of support, at least 0.10.48 is the most recent version in the 0.10 line. So that's good.
Node.js 0.10.48 shipped with npm 2.x, so somehow, you have an older version of npm than the version that came by default with the version of Node.js you're using. That's often a sign of multiple versions installed on the machine and PATH weirdness that can cause mysterious errors. If you're able to resolve that, it may fix your problem here.
The first dependency listed in your log above is videojs-wavesurfer 2.11.0. I tried installing that with Node.js 0.10.48 and npm 1.3.6. I got a certificate error, so I (temporarily) disabled SSL certificate verification. After doing that, I tried again and got an error similar to yours.
I updated to npm#2 and then was able to install the package without a problem.

Getting Bad Request (Http 400) when using npm dist-tag with Nexus 3.19.1-01

We are running Nexus OSS 3.19.1-01 (CentOS7 with OpenJdk 1.8.0_222-b10) with npm repository. Everything works fine except the npm dist-tag feature which should now work with version >3.19.
$ npm publish <pkg> --tag bla #--> works
$ npm install <pkg>#bla #--> works
$ npm dist-tag ls <pkg> #--> works
$ npm dist-tag rm --verbose #myscope/mypackage foo
npm info it worked if it ends with ok
npm verb cli [
npm verb cli '/usr/bin/node',
npm verb cli '/usr/local/bin/npm',
npm verb cli 'dist-tag',
npm verb cli 'rm',
npm verb cli '--verbose',
npm verb cli '#myscope/mypackage',
npm verb cli 'foo'
npm verb cli ]
npm info using npm#6.13.1
npm info using node#v12.13.0
npm verb npm-session 3b193197390df1cf
npm verb dist-tag del snapshot from #myscope/mypackage
npm http fetch GET 200 https://nexus.example.com/repository/npm-group/-/package/#myscope%2fmypackage/dist-tags 1396ms
npm http fetch DELETE 400 https://nexus.example.com/repository/npm-group/-/package/#myscope%2fmypackage/dist-tags/foo 9ms
npm verb stack Error: 400 Bad Request - DELETE https://nexus.example.com/repository/npm-group/-/package/#myscope%2fmypackage/dist-tags/foo
npm verb stack at /usr/local/lib/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:104:15
npm verb stack at processTicksAndRejections (internal/process/task_queues.js:93:5)
npm verb statusCode 400
npm verb pkgid #myscope/mypackage#latest
npm verb cwd /home/myname/path-to-code/mypackage/client
npm verb Linux 5.3.11-300.fc31.x86_64
npm verb argv "/usr/bin/node" "/usr/local/bin/npm" "dist-tag" "rm" "--verbose" "#myscope/mypackage" "foo"
npm verb node v12.13.0
npm verb npm v6.13.1
npm ERR! code E400
npm ERR! 400 Bad Request - DELETE https://nexus.example.com/repository/npm-group/-/package/#myscope%2fmypackage/dist-tags/foo
npm verb exit [ 1, true ]
npm timing npm Completed in 1730ms
npm ERR! A complete log of this run can be found in:
npm ERR! /home/myname/.npm/_logs/2019-11-20T13_02_41_234Z-debug.log
$ npm dist-tag add #myscope/mypackage#0.1.0 bar
# did not work, same error as above
No additional log messages in nexus log.
Any idea?
I'm afraid it won't work for you, because you're running your commands against npm group repository. Both npm dist-tag add and npm dist-tag rm work only for hosted repositories as of NXRM 3.19.1. However, npm dist-tag ls is supported by all types of repositories (since 3.19.0).

Npm install : FetchError: request to http://registry.npmjs.org/... failed, reason: read ECONNRESET

Trying to install any node package using npm hangs for about 5 mins then gives a ECONNRESET network error. I have been using npm for other projects recently and it worked fine but now will not work for any project(Including clean npm init)
npm i ws
This is on a Raspberry pi 3 running on my home network with no proxy requirements. All other machines both linux and windows are working fine.
npm -v = 6.4.1
I have tried the following:
npm i ws This gives me the ECONNRESET error (See below)
Curl https://registry.npmjs.org/
& Curl https://registry.npmjs.org/ws
Both return the correct json response
Removing any proxy settings
npm config rm proxy
npm config rm https-proxy
npm config set registry http://registry.npmjs.org/
Restarting etc
Full Error log:
npm i ws --save --verbose
npm info it worked if it ends with ok
npm verb cli [ '/home/pi/.nvm/versions/node/v8.16.0/bin/node',
npm verb cli '/home/pi/.nvm/versions/node/v8.16.0/bin/npm',
npm verb cli 'i',
npm verb cli 'ws',
npm verb cli '--save',
npm verb cli '--verbose' ]
npm info using npm#6.4.1
npm info using node#v8.16.0
npm verb npm-session 0a9bedb5def7f4a1
npm timing stage:rollbackFailedOptional Completed in 6ms
npm timing stage:runTopLevelLifecycles Completed in 1146975ms
npm verb type system
npm verb stack FetchError: request to http://registry.npmjs.org/ws failed, reason: read ECONNRESET
npm verb stack at ClientRequest.req.on.err (/home/pi/.nvm/versions/node/v8.16.0/lib/node_modules/npm/node_modules/node-fetch-npm/src/index.js:68:14)
npm verb stack at emitOne (events.js:116:13)
npm verb stack at ClientRequest.emit (events.js:211:7)
npm verb stack at Socket.socketErrorListener (_http_client.js:401:9)
npm verb stack at emitOne (events.js:116:13)
npm verb stack at Socket.emit (events.js:211:7)
npm verb stack at emitErrorNT (internal/streams/destroy.js:66:8)
npm verb stack at _combinedTickCallback (internal/process/next_tick.js:139:11)
npm verb stack at process._tickCallback (internal/process/next_tick.js:181:9)
npm verb cwd /home/pi/projects/picamera/node_server
npm verb Linux 4.19.37-v7+
npm verb argv "/home/pi/.nvm/versions/node/v8.16.0/bin/node" "/home/pi/.nvm/versions/node/v8.16.0/bin/npm" "i" "ws" "--save" "--verbose"
npm verb node v8.16.0
npm verb npm v6.4.1
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! network request to http://registry.npmjs.org/ws failed, reason: read ECONNRESET
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm verb exit [ 1, true ]
npm timing npm Completed in 1148813ms
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2019-05-10T23_28_17_769Z-debug.log
First check following thing:
ping registry.npmjs.org
You will get to know the IP address from that like below:
PING registry.npmjs.org (104.16.20.35) 56(84) bytes of data.
Then
sudo vi /etc/hosts
104.16.20.35 registry.npmjs.org
Then try to do following
npm install

TypeError: Cannot read property 'latest' of undefined

I am trying to install some dependencies using npm install, but I am facing issues with it. I new to npm, so I am not able to figure out what is the problem in it?
Below is my command and its result.
npm install –- save babelify#7.2.0 browserify-middleware#7.0.0
express#4.13.3 react#0.14.3 reactify#1.1.1 browser-sync#2.10.0
babel-preset-react#6.3.13 babel-preset-es2015#6.3.13 browserify#12.0.1
react-dom#0.14.3 watchify#3.6.1
npm WARN package.json ReactJS_BluePrints_Scaffold#1.0.0 No repository field.
npm http GET https://registry.npmjs.org/babelify/7.2.0
npm http GET https://registry.npmjs.org/browserify-middleware/7.0.0
npm http GET https://registry.npmjs.org/express/4.13.3
npm http GET https://registry.npmjs.org/react/0.14.3
npm http GET https://registry.npmjs.org/reactify/1.1.1
npm http GET https://registry.npmjs.org/browser-sync/2.10.0
npm http GET https://registry.npmjs.org/babel-preset-react/6.3.13
npm http GET https://registry.npmjs.org/babel-preset-es2015/6.3.13
npm http GET https://registry.npmjs.org/browserify/12.0.1
npm http GET https://registry.npmjs.org/react-dom/0.14.3
npm http GET https://registry.npmjs.org/watchify/3.6.1
npm http GET https://registry.npmjs.org/%E2%80%93-save
npm http 304 https://registry.npmjs.org/react/0.14.3
npm http 304 https://registry.npmjs.org/express/4.13.3
npm http 304 https://registry.npmjs.org/browserify-middleware/7.0.0
npm http 304 https://registry.npmjs.org/babelify/7.2.0
npm http 304 https://registry.npmjs.org/reactify/1.1.1
npm http 304 https://registry.npmjs.org/browser-sync/2.10.0
npm http 304 https://registry.npmjs.org/babel-preset-react/6.3.13
npm http 304 https://registry.npmjs.org/babel-preset-es2015/6.3.13
npm http 304 https://registry.npmjs.org/browserify/12.0.1
npm http 304 https://registry.npmjs.org/react-dom/0.14.3
npm http 304 https://registry.npmjs.org/watchify/3.6.1
npm http 404 https://registry.npmjs.org/%E2%80%93-save
npm ERR! TypeError: Cannot read property 'latest' of undefined
npm ERR! at next (/usr/share/npm/lib/cache.js:687:35)
npm ERR! at /usr/share/npm/lib/cache.js:675:5
npm ERR! at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:142:7)
npm ERR! at /usr/lib/nodejs/graceful-fs/polyfills.js:133:7
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 4.2.0-27-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "–-save" "babelify#7.2.0" "browserify-middleware#7.0.0" "express#4.13.3" "react#0.14.3" "reactify#1.1.1" "browser-sync#2.10.0" "babel-preset-react#6.3.13" "babel-preset-es2015#6.3.13" "browserify#12.0.1" "react-dom#0.14.3" "watchify#3.6.1"
npm ERR! cwd /home/user/reactapp
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! type non_object_property_load
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/user/reactapp/npm-debug.log
npm ERR! not ok code 0
You already got an approved answer but I wanted to add that I ran into a similar issue, receiving the frustrating message (I'm running on Windows):
TypeError: Cannot read property 'latest' of undefined
I tried fixing it by deleting the cache:
npm cache clean
Tried recloning repositories
My issue ended up being that I had two installations of nodejs. I don't know why this caused the error but after I uninstalled both versions and installed a new version, plus then deleted the npm in my appdata, only then did npm work properly again.
The save flag should be --save, not –- save. As the flag is malformed, npm will search for a package named –- (or for –-save since your last edit) .
Try this:
npm install --save babelify#7.2.0 browserify-middleware#7.0.0 express#4.13.3 react#0.14.3 reactify#1.1.1 browser-sync#2.10.0 babel-preset-react#6.3.13 babel-preset-es2015#6.3.13 browserify#12.0.1 react-dom#0.14.3 watchify#3.6.1
Well, I had this same problem and I solved it by installing the latest version of NodeJS. Probably the error is internal in Node.

react-native init AwesomeProject hang

I'm new with react, I"m trying to init withreact-native init AwesomeProject but after a few minutes looks like the react is hang
npm verb addTmpTarball already have metadata; skipping unpack for babylon#5.8.35
npm verb correctMkdir /Users/dramirez/.npm correctMkdir not in flight; initializing
npm verb afterAdd /Users/dramirez/.npm/babylon/5.8.35/package/package.json not in flight; writing
npm verb correctMkdir /Users/dramirez/.npm correctMkdir not in flight; initializing
npm verb afterAdd /Users/dramirez/.npm/babylon/5.8.35/package/package.json written
npm http fetch 200 https://registry.npmjs.org/bluebird/-/bluebird-2.10.2.tgz
npm verb addTmpTarball /var/folders/kr/js5391j510v9962s56x6c9rw0000gn/T/npm-22068-e178ea9f/registry.npmjs.org/bluebird/-/bluebird-2.10.2.tgz not in flight; adding
npm verb addTmpTarball already have metadata; skipping unpack for bluebird#2.10.2
npm verb correctMkdir /Users/dramirez/.npm correctMkdir not in flight; initializing
npm verb afterAdd /Users/dramirez/.npm/bluebird/2.10.2/package/package.json not in flight; writing
npm verb correctMkdir /Users/dramirez/.npm correctMkdir not in flight; initializing
npm verb afterAdd /Users/dramirez/.npm/bluebird/2.10.2/package/package.json written
loadDep:try-resolve → net ▌ ╢███████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
I'm not in china and I'm not sure what to do?
Does it always hang on the same package? There is an option you can pass to react-native start, I think its reset-cache, maybe that will help
After a few hours I decided to restart the computer and start the process again, and now it is working ;-( this is annoying
try this :
react-native init ProjectName --verbose
it worked for me .
VPN will solve that problem; according to my experiences. Maybe that's because of internet connection issue..