react-native -v
:
react-native run-windows --info
:
System
:
Binaries
:npmPackages
:Installed UWP SDKs
:Target Env
:
(Write your steps here:)
The expecting project has to create and run successfully.
But, getting an error while creating a project
[email protected] successfully installed.
Cannot find module '@react-native-community/cli/build/tools/copyAndReplace'
Require stack:
+1
@tejaat1995
I can successfully able to run npx react-native-windows-init
.
Try the following:
npm i --save-dev @react-native-community/cli
@saikksub Can you share your environment issue as well? (although now I guess it's not reproing for you?)
The CLI version you should get is version 3.
This might be due to a global install of react-native. That used to be standard practice but can cause issues like this which is why it's no longer the recommended practice.
Try:
npm uninstall -g react-native
+1
@tejaat1995
I can successfully able to run
npx react-native-windows-init
.
Try the following:npm i --save-dev @react-native-community/cli
Saving @react-native-community/cli
as a dev dependency and then retrying the command worked for me too.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 14 days of this comment.
@saikksub Can you share your environment issue as well? (although now I guess it's not reproing for you?)
The CLI version you should get is version 3.
This might be due to a global install of react-native. That used to be standard practice but can cause issues like this which is why it's no longer the recommended practice.
Try:
npm uninstall -g react-native
FYI: I have the same issue and do not have react-native installed globally.
I installed the @react-native-community/cli as a dev dep as suggested and now it works.
it installed version 4.8.0 while react-native has a dependency on ^3.0.0 and installed version 3.2.1
npx: installed 114 in 5.662s
Reading application name from package.json...
Reading react-native version from node_modules...
Reading react-native version from node_modules...
Latest matching version of react-native-windows for [email protected] is [email protected]
Installing react-native-windows@^0.61.0-0...
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 14 days of this comment.
@tejaat1995
I can successfully able to run
npx react-native-windows-init
.
Try the following:npm i --save-dev @react-native-community/cli
This worked for me
@tejaat1995
I can successfully able to run
npx react-native-windows-init
.
Try the following:npm i --save-dev @react-native-community/cli
This works.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 14 days of this comment.
Most helpful comment
@tejaat1995
I can successfully able to run
npx react-native-windows-init
.Try the following: