I am trying to creat a React Native project using this command:
npx react-native init
But the template download just stops and shows the following message:
× Downloading template error Error: Command failed: npm install --save --save-exact react-native@latest npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated uglify-es@3.3.9: support for ECMAScript is superseded by
uglify-js as of v3.13.0 npm ERR. code ECONNRESET npm ERR. syscall read npm ERR, errno -4077 npm ERR. network 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'
as of v3.13.0 npm ERR. code ECONNRESET npm ERR. syscall read npm ERR, errno -4077 npm ERR. network 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'
Here, below "Creating a new application" title
If you previously installed a global react-native-cli package, please remove it as it may cause unexpected issues:
npm uninstall -g react-native-cli @react-native-community/cli
then
npx react-native init AwesomeProject
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.