Erro ao criar novo projeto.
otacilioricardo opened this issue · 2 comments
Ao criar um novo projeto com o comando npx react-native init Projet_Name ocorre o erro abaixo:
× Downloading template
error Error: Command failed: yarn add react-native@latest
warning react-native > @react-native-community/cli > @react-native-community/cli
-plugin-metro > metro > metro-minify-uglify > uglify-es@3.3.9: support for ECMAS
cript is superseded by uglify-js
as of v3.13.0
warning react-native > react-native-codegen > jscodeshift > micromatch > snapdra
gon > source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve
#deprecated
warning react-native > react-native-codegen > jscodeshift > micromatch > snapdra
gon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-
url#deprecated
warning react-native > react-native-codegen > jscodeshift > micromatch > snapdra
gon > source-map-resolve > source-map-url@0.4.1: See https://github.com/lydell/s
ource-map-url#deprecated
warning react-native > react-native-codegen > jscodeshift > micromatch > snapdra
gon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix
#deprecated
error react-native@0.68.0: The engine "node" is incompatible with this module. E
xpected version ">=14". Got "12.15.0"
error Found incompatible module.
yarn add v1.17.3
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@2.3.2: The platform "win32" is incompatible with this module.
info "fsevents@2.3.2" is an optional dependency and failed compatibility check.
Excluding it from installation.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this comm
and.
Alguém saber por que isso ocorre?
Bom, tem um erro crítico aí devido a versão do node. Aparentemente você está usando 12.15.0
e o react-native@0.68.0
espera uma versão >=14
. Dito isto, se o problema persistir, provavelmente você deveria criar um issue aqui. Esse repositório é sobre o template typescript, que aparentemente você não está usando no comando que você colou aqui.
Thanks for answering @frontendwizard.