Skip to content

Commit 5bb60ad

Browse files
HariniMalothu17Harini Malothuvineethkuttan
authored
Fix react-native-windows documentation that fails with "^0.80.0" (#1143)
## Description Problem Description The [react-native-windows](https://microsoft.github.io/react-native-windows/docs/getting-started) page says that for creating a new project using the 0.80.0 version you must run this command: npx --yes @react-native-community/cli@latest init <projectName> --version "^0.80.0" However the following error appears: error Cannot read properties of null (reading 'major'). TypeError: Cannot read properties of null (reading 'major') at minorVersion (C:\Users\PERSONA\AppData\Local\npm-cache\_npx\2788f5fbd47acb89\node_modules\@react-native-community\cli\build\tools\npm.js:113:15) at getTemplateVersion (C:\Users\PERSONA\AppData\Local\npm-cache\_npx\2788f5fbd47acb89\node_modules\@react-native-community\cli\build\tools\npm.js:155:26) at process.processTicksAndRejections (node:internal/process/task_queues:103:5) at async createTemplateUri (C:\Users\PERSONA\AppData\Local\npm-cache\_npx\2788f5fbd47acb89\node_modules\@react-native-community\cli\build\commands\init\version.js:53:29) at async createProject (C:\Users\PERSONA\AppData\Local\npm-cache\_npx\2788f5fbd47acb89\node_modules\@react-native-community\cli\build\commands\init\init.js:354:23) at async Object.initialize [as func] (C:\Users\PERSONA\AppData\Local\npm-cache\_npx\2788f5fbd47acb89\node_modules\@react-native-community\cli\build\commands\init\init.js:434:7) at async Command.handleAction (C:\Users\PERSONA\AppData\Local\npm-cache\_npx\2788f5fbd47acb89\node_modules\@react-native-community\cli\build\index.js:137:9) info Run CLI with --verbose flag for more details. Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), file src\win\async.c, line 76 Resolves microsoft/react-native-windows#15456 ## Screenshots Add any relevant screen captures here from before or after your changes. ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/react-native-windows-samples/pull/1143) Co-authored-by: Harini Malothu <hmalothu@microsoft.com> Co-authored-by: Vineeth <66076509+vineethkuttan@users.noreply.github.com>
1 parent d5ca7fa commit 5bb60ad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

website/versioned_docs/version-0.80/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Call the following from the place where you want your project directory to live:
2525
<!-- See https://www.npmjs.com/package/react-native?activeTab=versions for the RN version tags. -->
2626

2727
```bat
28-
npx --yes @react-native-community/cli@latest init <projectName> --version "^0.80.0"
28+
npx --yes @react-native-community/cli@latest init <projectName> --version 0.80.0
2929
```
3030

3131
### Navigate into this newly created directory

website/versioned_docs/version-0.81/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Call the following from the place where you want your project directory to live:
2525
<!-- See https://www.npmjs.com/package/react-native?activeTab=versions for the RN version tags. -->
2626

2727
```bat
28-
npx --yes @react-native-community/cli@latest init <projectName> --version "^0.81.0"
28+
npx --yes @react-native-community/cli@latest init <projectName> --version 0.81.0
2929
```
3030

3131
### Navigate into this newly created directory

0 commit comments

Comments
 (0)