ConnectyCube / connectycube-reactnative-samples

Chat and Video Chat code samples for React Native, ConnectyCube
https://connectycube.com
Apache License 2.0
125 stars 111 forks source link

How can i run Samples in Windows ? #104

Closed ghost closed 3 years ago

ghost commented 4 years ago

Hi Guys, i have problem in run this Samples in VSCode in widnows. i deleted node_modules and changed name in package.json to cubechat, then, ran npm install here is log :

core-js@2.6.11 postinstall D:\Alireza\Projects\VideoCall\connectycube-reactnative-samples-master\RNChat\node_modules\core-js node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:

https://opencollective.com/core-js https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

react-native-elements@1.2.7 postinstall D:\Alireza\Projects\VideoCall\connectycube-reactnative-samples-master\RNChat\node_modules\react-native-elements opencollective-postinstall || exit 0

Thank you for using react-native-elements! If you rely on this package, please consider supporting our open collective:

https://opencollective.com/react-native-elements/donate

cubechat@1.0.1 postinstall D:\Alireza\Projects\VideoCall\connectycube-reactnative-samples-master\RNChat npx jetify && cd ios && pod install

Jetifier found 1138 file(s) to forward-jetify. Using 8 workers... 'pod' is not recognized as an internal or external command, operable program or batch file. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! cubechat@1.0.1 postinstall: npx jetify && cd ios && pod install npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the cubechat@1.0.1 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Alireza\AppData\Roaming\npm-cache_logs\2020-07-31T16_23_17_886Z-debug.log

how can i run this samples ?

thanks!

ccvlad commented 4 years ago

@alirqsai Revert the package.json and make sure that you have configured your environment for the React Native - https://reactnative.dev/docs/environment-setup

banshiAnton commented 4 years ago

or try just this commands

====

npm i npx jetify npm run android:clean npm run android

====

on windows OS you dont have cocoapods

ghost commented 4 years ago

@ccvlad i do. but still its not working . i test an new project with expo app and emulator and its fine working, also i download it again. but still i have this log :

ConnectyCubeVideoChatConfCodeSample@2.1.6 postinstall D:\Alireza\Projects\VideoCall\ReactSamples\RNVideoChatConf npx jetify && cd ios && pod install

Jetifier found 1545 file(s) to forward-jetify. Using 8 workers... 'pod' is not recognized as an internal or external command, operable program or batch file. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! ConnectyCubeVideoChatConfCodeSample@2.1.6 postinstall: npx jetify && cd ios && pod install npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ConnectyCubeVideoChatConfCodeSample@2.1.6 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Alireza\AppData\Roaming\npm-cache_logs\2020-07-31T17_44_33_288Z-debug.log

banshiAnton commented 4 years ago

this commands will run after npm install https://github.com/ConnectyCube/connectycube-reactnative-samples/blob/master/RNChat/package.json#L6 you can left just

"postinstall": "npx jetify",
ghost commented 4 years ago

@banshiAnton thanks for your reply,

1.after npm i :

ConnectyCubeVideoChatConfCodeSample@2.1.6 postinstall D:\Alireza\Projects\VideoCall\ReactSamples\R NVideoChatConf npx jetify && cd ios && pod install

Jetifier found 1545 file(s) to forward-jetify. Using 8 workers... 'pod' is not recognized as an internal or external command, operable program or batch file. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! ConnectyCubeVideoChatConfCodeSample@2.1.6 postinstall: npx jetify && cd ios && pod install npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ConnectyCubeVideoChatConfCodeSample@2.1.6 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Alireza\AppData\Roaming\npm-cache_logs\2020-07-31T17_50_58_954Z-debug.log

2.after npx jetify : Jetifier found 1545 file(s) to forward-jetify. Using 8 workers...

3.after npm run android:clean :

ConnectyCubeVideoChatConfCodeSample@2.1.6 android:clean D:\Alireza\Projects\VideoCall\ReactSamples \RNVideoChatConf cd android && ./gradlew clean && ./gradlew cleanBuildCache

'.' is not recognized as an internal or external command, operable program or batch file. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! ConnectyCubeVideoChatConfCodeSample@2.1.6 android:clean: cd android && ./gradlew clean && ./gradlew cleanBuildCache npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ConnectyCubeVideoChatConfCodeSample@2.1.6 android:clean script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Alireza\AppData\Roaming\npm-cache_logs\2020-07-31T17_51_23_834Z-debug.log

D:\Alireza\Projects\VideoCall\ReactSamples\RNVideoChatConf>npm run android:clean

ConnectyCubeVideoChatConfCodeSample@2.1.6 android:clean D:\Alireza\Projects\VideoCall\ReactSamples \RNVideoChatConf cd android && ./gradlew clean && ./gradlew cleanBuildCache

'.' is not recognized as an internal or external command, operable program or batch file. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! ConnectyCubeVideoChatConfCodeSample@2.1.6 android:clean: cd android && ./gradlew clean && ./gradlew cleanBuildCache npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ConnectyCubeVideoChatConfCodeSample@2.1.6 android:clean script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Alireza\AppData\Roaming\npm-cache_logs\2020-07-31T17_51_39_602Z-debug.log

banshiAnton commented 4 years ago

ok forget about that stuff )))

write in package.json

"postinstall": "npx jetify",

then try to run this commands

npm i cd android gradlew clean gradlew cleanBuildCache cd .. npm run android

ghost commented 4 years ago

@banshiAnton thanks, but still its have some errors! if i install linux its will be ok ?

log:

ConnectyCubeVideoChatConfCodeSample@2.1.6 android D:\Alireza\Projects\VideoCall\ReactSamples\RNVideoChatConf react-native run-android

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag. Jetifier found 1101 file(s) to forward-jetify. Using 8 workers... info Starting JS server... info Launching emulator... info Successfully launched emulator. info Installing the app...

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings

FAILURE: Build failed with an exception.

BUILD FAILED in 16s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! ConnectyCubeVideoChatConfCodeSample@2.1.6 android: react-native run-android npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ConnectyCubeVideoChatConfCodeSample@2.1.6 android script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Alireza\AppData\Roaming\npm-cache_logs\2020-07-31T18_05_27_931Z-debug.log

banshiAnton commented 4 years ago

try build project with android studio

ghost commented 4 years ago

@banshiAnton , i tried but its not work too. its have errors like vscode

ccvlad commented 4 years ago

@alirqsai Could you try to run the React Native starting project - https://reactnative.dev/docs/getting-started ? Just new empty project to understand where the problem is.