I was trying to create a project for react-native but I am getting this error.
D:\Projects\PoC\ReactNative>react-native init TravelApp
This will walk you through creating a new React Native project in D:\Projects\PoC\ReactNative\TravelApp
Using yarn v1.22.4
Installing react-native...
yarn add v1.22.4
info No lockfile found.
[1/4] Resolving packages...
warning react-native > fbjs-scripts > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native > metro-babel-register > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native > fbjs > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native > create-react-class > fbjs > core-js@1.2.7: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native > @react-native-community/cli > metro-core > jest-haste-map > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning react-native > @react-native-community/cli > metro-core > jest-haste-map > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
warning react-native > @react-native-community/cli > metro-core > jest-haste-map > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
[2/4] Fetching packages...
error https://registry.yarnpkg.com/@react-native-community/cli/-/cli-4.10.1.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "EPERM: operation not permitted, open 'C:\\Users\\sushant.patekar\\AppData\\Local\\Yarn\\Cache\\v6\\npm-@react-native-community-cli-4.10.1-3c1e74f55c004936368d3576d4c1da7d02b89904-integrity\\node_modules\\@react-native-community\\cli\\build\\commands\\init\\printRunInstructions.js'"
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
info There appears to be trouble with your network connection. Retrying...
Error: Command failed: yarn add react-native --exact
at checkExecSyncError (child_process.js:611:11)
at execSync (child_process.js:647:15)
at run (C:\Users\sushant.patekar\AppData\Roaming\npm\node_modules\react-native-cli\index.js:294:5)
at createProject (C:\Users\sushant.patekar\AppData\Roaming\npm\node_modules\react-native-cli\index.js:249:3)
at init (C:\Users\sushant.patekar\AppData\Roaming\npm\node_modules\react-native-cli\index.js:200:5)
at Object.<anonymous> (C:\Users\sushant.patekar\AppData\Roaming\npm\node_modules\react-native-cli\index.js:153:7)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
at Module.load (internal/modules/cjs/loader.js:1049:32)
at Function.Module._load (internal/modules/cjs/loader.js:937:14) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 4456,
stdout: null,
stderr: null
}
Command `yarn add react-native --exact` failed.
D:\Projects\PoC\ReactNative>yarn add react-native --exact
yarn add v1.22.4
info No lockfile found.
[1/4] Resolving packages...
warning react-native > fbjs > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native > create-react-class > fbjs > core-js@1.2.7: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native > fbjs-scripts > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native > metro-babel-register > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native > @react-native-community/cli > metro-core > jest-haste-map > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning react-native > @react-native-community/cli > metro-core > jest-haste-map > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
warning react-native > @react-native-community/cli > metro-core > jest-haste-map > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
[2/4] Fetching packages...
error https://registry.yarnpkg.com/@react-native-community/cli/-/cli-4.10.1.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "EPERM: operation not permitted, open 'C:\\Users\\sushant.patekar\\AppData\\Local\\Yarn\\Cache\\v6\\npm-@react-native-community-cli-4.10.1-3c1e74f55c004936368d3576d4c1da7d02b89904-integrity\\node_modules\\@react-native-community\\cli\\build\\commands\\init\\printRunInstructions.js'"
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
D:\Projects\PoC\ReactNative>npm install -g react-native-cli
C:\Users\sushant.patekar\AppData\Roaming\npm\react-native -> C:\Users\sushant.patekar\AppData\Roaming\npm\node_modules\react-native-cli\index.js
+ react-native-cli@2.0.1
updated 1 package in 6.889s
D:\Projects\PoC\ReactNative>react-native init TravelApp_
This will walk you through creating a new React Native project in D:\Projects\PoC\ReactNative\TravelApp_
Using yarn v1.22.4
Installing react-native...
yarn add v1.22.4
info No lockfile found.
[1/4] Resolving packages...
warning react-native > fbjs-scripts > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native > fbjs > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native > create-react-class > fbjs > core-js@1.2.7: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native > metro-babel-register > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native > @react-native-community/cli > metro-core > jest-haste-map > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning react-native > @react-native-community/cli > metro-core > jest-haste-map > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning react-native > @react-native-community/cli > metro-core > jest-haste-map > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
[2/4] Fetching packages...
error https://registry.yarnpkg.com/@react-native-community/cli/-/cli-4.10.1.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "EPERM: operation not permitted, open 'C:\\Users\\sushant.patekar\\AppData\\Local\\Yarn\\Cache\\v6\\npm-@react-native-community-cli-4.10.1-3c1e74f55c004936368d3576d4c1da7d02b89904-integrity\\node_modules\\@react-native-community\\cli\\build\\commands\\init\\printRunInstructions.js'"
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Error: Command failed: yarn add react-native --exact
at checkExecSyncError (child_process.js:611:11)
at execSync (child_process.js:647:15)
at run (C:\Users\sushant.patekar\AppData\Roaming\npm\node_modules\react-native-cli\index.js:294:5)
at createProject (C:\Users\sushant.patekar\AppData\Roaming\npm\node_modules\react-native-cli\index.js:249:3)
at init (C:\Users\sushant.patekar\AppData\Roaming\npm\node_modules\react-native-cli\index.js:200:5)
at Object.<anonymous> (C:\Users\sushant.patekar\AppData\Roaming\npm\node_modules\react-native-cli\index.js:153:7)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
at Module.load (internal/modules/cjs/loader.js:1049:32)
at Function.Module._load (internal/modules/cjs/loader.js:937:14) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 5028,
stdout: null,
stderr: null
}
Command `yarn add react-native --exact` failed.