Skip to content

Unable to create new RN 0.72 project with Node 16 #38298

Description

@jonthysell

Description

RN 0.72 requires Node >=16. However it looks like the dependencies of the init command (metro-config) were updated to require Node 18 as RN > 0.72 will require Node 18.

Error:

√ Downloading template
√ Copying template
√ Processing template
× Installing dependencies
error Error: Command failed: yarn install
warning react-native > @react-native-community/cli > @react-native-community/cli-plugin-metro > metro > metro-minify-uglify > uglify-es@3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
warning @react-native/metro-config > metro-config > metro > metro-minify-uglify > uglify-es@3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
warning @types/metro-config@0.76.3: This is a stub types definition. metro-config provides its own type definitions, so you do not need this installed.
error metro-config@0.77.0: The engine "node" is incompatible with this module. Expected version ">=18". Got "16.18.1"
error Found incompatible module.
yarn install v1.22.19
info No lockfile found.
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

React Native Version

0.72.0

Output of npx react-native info

info Fetching system and libraries information...
System:
OS: Windows 10 10.0.25393
CPU: (8) x64 Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
Memory: 3.31 GB / 15.84 GB
Binaries:
Node: 16.18.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
AllowAllTrustedApps: Enabled
Versions: 10.0.16299.0, 10.0.18362.0, 10.0.19041.0, 10.0.22000.0, 10.0.22621.0
IDEs:
Android Studio: Not Found
Visual Studio: 16.11.33801.447 (Visual Studio Enterprise 2019), 17.6.33801.468 (Visual Studio Enterprise 2022)
Languages:
Java: Not Found
npmPackages:
@react-native-community/cli: Not Found
react: Not Found
react-native: Not Found
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

Run npx --yes react-native init testcli --template react-native@^0.72.0.

Snack, code example, screenshot, or link to a repository

image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions