-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
Problem Description
The react-native-windows 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
Steps To Reproduce
- Open a prompt with
npxin%PATH% - Run the command
npx --yes @react-native-community/cli@latest init <projectName> --version "^0.80.0"
Expected Results
This process should create a new React Native project for Windows.
CLI version
20.0.2
Environment
error: unknown command 'info'
(Did you mean init?)Community Modules
No response
Target React Native Architecture
None
Target Platform Version
None
Visual Studio Version
None
Build Configuration
None
Snack, code example, screenshot, or link to a repository
This issue is the same than this #15081, however it's still happening in the package's latest documentation.