2

So I have npm 7.5.3 and node v15.8.0 on my ubuntu system. I'm trying to create a react-native project as follows:

npx react-native init Sample

And I get a large error dump with the following description towards the end

Installing react-native...
yarn add v1.16.0
warning ../../../package.json: No license field
info No lockfile found.
[1/4] Resolving packages...
warning react-native > fbjs > core-js@2.6.12: 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.12: 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 > @hapi/joi@15.1.1: Switch to 'npm install joi'
warning react-native > @react-native-community/cli > @hapi/joi > @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
warning react-native > @react-native-community/cli > @hapi/joi > @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
warning react-native > @react-native-community/cli > @hapi/joi > @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
warning react-native > @react-native-community/cli > @hapi/joi > @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
warning react-native > @react-native-community/cli > @hapi/joi > @hapi/topo > @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
warning react-native > @react-native-community/cli > metro > 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 > 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 > jest-haste-map > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
[2/4] Fetching packages...
info fsevents@1.2.13: The platform "linux" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
error react-native@0.63.4: The engine "node" is incompatible with this module. Expected version ">=10". Got "8.16.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Error: Command failed: yarn add react-native --exact
    at checkExecSyncError (node:child_process:681:11)
    at execSync (node:child_process:718:15)
    at run (/usr/lib/node_modules/react-native-cli/index.js:294:5)
    at createProject (/usr/lib/node_modules/react-native-cli/index.js:249:3)
    at init (/usr/lib/node_modules/react-native-cli/index.js:200:5)
    at Object.<anonymous> (/usr/lib/node_modules/react-native-cli/index.js:153:7)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:973:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14) {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 24544,
  stdout: null,
  stderr: null
}
Command `yarn add react-native --exact` failed.
npm ERR! code 1
npm ERR! path /home/anton/Documents/front-end
npm ERR! command failed
npm ERR! command sh -c react-native "init" "sample"

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/anton/.npm/_logs/2021-02-09T18_06_36_328Z-debug.log

How do I overcome this problem?

edit: I already attempted npm install --save core-js@^3 the error remains the same.

Vocaloidas
  • 360
  • 2
  • 17

0 Answers0