You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use the @react-native-community/cli@ next CLI to initialise a new project.
Install react-native@latest
Install react-native-windows@^0.75.0
Issue
I am trying to target v0.75 specifically, with the New Arch template.
From previous pull requests in the community, I've been advised by to keep react-native-windows and react-native-macos on the same minor version as react-native to avoid issues with multiple conflicting copies of Metro, etc. So I believe that the docs for v0.75 ought to be adjusted.
To keep all React Natives on the same minor version, I think the instructions should be changed to something like this:
Add React Native Windows to your project's dependencies
- npm install --save react-native-windows@^0.75.0+ npm install --save react-native-windows@~0.75.0
Steps To Reproduce
A terminal history of the steps I followed to successfully set up a v0.75 project:
# 1. Create a brand new React Native project named "Fiddle".
npx --yes @react-native-community/cli@next init Fiddle --version 0.75
cd Fiddle
# 2. Add the react-native-windows package (preferably matching the minor version of react-native).# This is necessary to add the `init-windows` command to the `react-native` CLI.
npm install --save-exact react-native-windows@~0.75
# 3. Initialise a New Arch app in the repo.
npx react-native init-windows --logging --overwrite --template cpp-app --name Fiddle --namespace Fiddle
# 5. Autolink the project (necessary if running via Visual Studio; but redundant if running via `npx react-native run-windows`)
npx react-native autolink-windows
# 6. Run the project (by opening Fiddle/Fiddle.sln in Visual Studio and running for your preferred arch, or):
npx react-native run-windows --arch x64
# Or, e.g. for Apple Silicon:
npx react-native run-windows --arch arm64
Expected Results
Docs should detail how to set up a designated version of React Native Windows.
CLI version
npx @react-native-community/cli -v
Environment
14.1.0
Community Modules
N/A
Target Platform Version
10.0.22621
Target Device(s)
No response
Visual Studio Version
Visual Studio 2022
Build Configuration
Debug
Snack, code example, screenshot, or link to a repository
Here's a working v0.75 example (both macOS and Windows sides seem to work, in fact) created by following those setup steps.
For 0.75 definitely seems wrong. That's a bug in the docs.
I am trying to target v0.75 specifically, with the New Arch template.
Just to set expectations, the new arch templates are an area of lots of change between 0.75 and 0.76 as we prepare to invite more folks to try out early versions of the new arch on Windows. The steps here may change.
Problem Description
Context
init-windows
, even for generating projects using earlier versions.@next
docs forinit-windows
@next
"getting started" docs, which recommend:@react-native-community/cli@nightly
CLI to initialise a new project.react-native@nightly
react-native-windows@canary
0.75
"getting started" docs, which recommend:@react-native-community/cli@ next
CLI to initialise a new project.react-native@latest
react-native-windows@^0.75.0
Issue
I am trying to target v0.75 specifically, with the New Arch template.
From previous pull requests in the community, I've been advised by to keep
react-native-windows
andreact-native-macos
on the same minor version asreact-native
to avoid issues with multiple conflicting copies of Metro, etc. So I believe that the docs forv0.75
ought to be adjusted.To keep all React Natives on the same minor version, I think the instructions should be changed to something like this:
Steps To Reproduce
A terminal history of the steps I followed to successfully set up a v0.75 project:
Expected Results
Docs should detail how to set up a designated version of React Native Windows.
CLI version
npx @react-native-community/cli -v
Environment
14.1.0
Community Modules
N/A
Target Platform Version
10.0.22621
Target Device(s)
No response
Visual Studio Version
Visual Studio 2022
Build Configuration
Debug
Snack, code example, screenshot, or link to a repository
Here's a working v0.75 example (both macOS and Windows sides seem to work, in fact) created by following those setup steps.
https://github.com/shirakaba/fiddle-template/tree/e02e01eb9b1a5c5a87955043b1bdd2430184c2c6
The text was updated successfully, but these errors were encountered: