TypeError: cli.init is not a function – React Native

This error will come while running the following command.

This happens because react-native-cli is deprecated and not compatible with recent versions of node js. Especially from Node 18 + it throws this error.

To fix this issue first Uninstall react-native-cli using the following command.

use the official CLI as follows

Now it will install all the required packages to run the App.

How to avoid prefixing every table with schema name while creating new tables ?

Lets assume schema name is my_data. If we want to avoid prefixing every table with my_data while creating a new table, we can set it in the search_path.

Now we can create a new table like this.

By using the above code, courses table will be created in my_data by default.

What command we need to use to list all tables inside the specific schema ?

Suppose if the schema name is my_data, then we need to use the following command to list all the tables inside the my_data schema.

Now, if you want to create a new table inside the my_data schema, we just need to prefix the table name with the schema name like this.

This will create the students table inside the my_data schema.

What command we need to use to list all schemas in the current PostgreSQL Database ?

This command is used to list All Schemas in the current PostgreSQL Database along with their owners.

The \dn command is a PostgreSQL-specific meta-command used inside the psql command-line interface.

The default schema is usually public. Generally we use /dn to check existing schemas.

error Error: unable to get local issuer certificate

The error “unable to get local issuer certificate” occurs because Yarn is failing to establish a secure connection due to SSL certificate issues.

Run the following command in your terminal to fix this issue

After this run the following command

If it works, then it is an SSL certificate issue.