Skip to content

fix Docs: add patch to CLI --version - #5220

Open
angelabenavente wants to merge 1 commit into
react:mainfrom
angelabenavente:docs/fix-cli-init-version-5173
Open

fix Docs: add patch to CLI --version#5220
angelabenavente wants to merge 1 commit into
react:mainfrom
angelabenavente:docs/fix-cli-init-version-5173

Conversation

@angelabenavente

Copy link
Copy Markdown

Fixes #5173

The CLI looks up npm templates by exact version. Docs used the Docusaurus label (0.86 / 0.87), so init --version 0.86 failed.

getCurrentVersion() now returns a patch (0.87.0).

Appending .0 in the snippet made Prism (bash) treat 0.87 as a number and .0 as another token, so the version was two colors (screenshot of Highlight). The value is quoted (--version "0.87.0") so it highlights as one string. The CLI accepts that the same way.

Screenshots

CLI (before ), command from the docs:

Captura de pantalla 2026-08-31 a las 23 21 55

CLI (after), --version "0.87.0"

Captura de pantalla 2026-08-31 a las 23 24 59

Docs (before), https://reactnative.dev/docs/turbo-native-modules-introduction

Captura de pantalla 2026-08-31 a las 23 19 38

Highlight (without quotes), --version 0.87.0

Captura de pantalla 2026-08-31 a las 23 23 42

Docs (after)

Captura de pantalla 2026-08-31 a las 23 20 23

Affected pages

https://reactnative.dev/docs/turbo-native-modules-introduction
https://reactnative.dev/docs/the-new-architecture/using-codegen
https://reactnative.dev/docs/the-new-architecture/pure-cxx-modules

Issue

#5173

@meta-cla meta-cla Bot added the CLA Signed label Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

1 participant