Categories
Magento 2

Magento error – Unable to apply data patch for module Magento_Theme. In Gd2.php line 72

In PatchApplier.php line 170: Unable to apply data patch Magento\Theme\Setup\Patch\Data\RegisterThemes for module Magento_Theme. Original exception message: Wrong file

In Gd2.php line 72: Wrong file

Finally Installation is complete 100% after done following changes:

Find validateURLScheme function in vendor\magento\framework\Image\Adapter\Gd2.php file. at line 96. Replace function with this: !file_exists($filename) Please find and change validateURLScheme function like below code.

Just add && !file_exists($filename)

Thank you for carefully read my article If you have any query please Leave your query on following comment section or contact with us. Hope it will help you.

Categories
Magento 2

Magento error – Could not validate a connection to Elasticsearch and Install using composer

Download Magento 2

Open SSH terminal on your server and run the following command to download and create new project. Previous post how to install Magento 2 on Windows XAMPP server.

Create The Database and Collect other information

Create new database and note Database name, database user name and database user password. Also site url, admin username, password, timezone and more. Run following command to install Magento 2.

Install/Setup Magento 2 by Command line

In SearchConfig.php line 81: Could not validate a connection to Elasticsearch. No alive nodes found in your cluster

If you got any error related with Elasticsearch then just disable some module related with Elasticsearch using run following command and again run install command.

Thank you for carefully read my article If you have any query please Leave your query on following comment section or contact with us. Hope it will help you.

Categories
React Native

React Native: Setup development environment on Windows

Mobile application development by using React Native CLI. It’s requires Android Studio to get started new app. If you already have this tools installed, you should be able to get up and running within a few minutes. If Android Studio are not installed, you should expect to spend about an hour installing and configuring it.

Installing dependencies

You will need to install NodeJs and JDK, the React Native command line interface, a JDK, and Android Studio. Open windows Command Prompt (right click and select “Run as Administrator”), then run the following command:

1. Install Android Studio

Now download and install Android Studio. While on Android Studio installation wizard, make sure the boxes next to all of the following items are checked:

Android SDK
Android SDK Platform
Android Virtual Device

  1. Install the Android SDK
    Android Studio installs the latest Android SDK by default. Building a React Native app with native it’s requires the Android 10 (Q) SDK. Also additional Android SDKs can installed through the SDK Manager in Android Studio. Make sure checked Android 10 (Q) entry than click on Apply and Ok button.

    Appearance & Behavior=>System Settings=>Android SDK

3. Configure the ANDROID_HOME environment variable

Step 1. Right-click on My Computer and select Properties. Go to Advanced system settings and select Environmental Variables option.

Step 2. Under the User variables section, click New to open New User Variable dialog.

Step 3. Enter ANDROID_HOME as Variable name and provide the path of the SDK folder next to Variable value.

The SDK is installed, by default, at the following location:
%LOCALAPPDATA%\Android\Sdk

  1. Add platform-tools to Path

Step 1. Right-click on My Computer and select Properties. Go to Advanced system settings and select Environmental Variables option.

Step 2. Go to System Variables section and locate the “Path” variable and click on Edit… button.

Step 3. Copy the folder path inside the SDK folder look for tools and platform-tools folder path.

Step 4. Add full folders path for tools and platform-tools and close dialog box.

The default location for this folder is:
%LOCALAPPDATA%\Android\Sdk\platform-tools

Creating new React Native application

Using a specific version (Optional)
You can use the –version argument when creating new React Native application.

Using a specific template (Optional)
You can use the –template argument when creating new React Native application with TypeScript template.

Running your React Native application by following command.

Step 1: Start Metro
First you need to start Metro, Metro is the JavaScript bundler that ships with React Native. Metro “takes in an entry file and various options, and returns a single JavaScript file that includes all your code and its dependencies.

Step 2: Start your application
Metro Bundler run in its own terminal. Open a new terminal inside your React Native project folder.

If everything is set up correctly, you should see your new app running in your Android emulator like below. More details Setting up React Native development environment click here.

Thank you for carefully read my article If you have any query please Leave your query on following comment section or contact with us. Hope it will help you.