How to fix TypeError: target.extend is not a function mixins in Magento 2?

I am working on the checkout page store locator popup modal, I have tried to mixins for the pickup-locations-service.js file to override core methods from the javascript file.

The error TypeError: target.extend is not a function in Magento 2 often occurs due to issues with JavaScript mixins declaration.

Due to incorrect syntax in my custom mixins javascript file, I got the error in the browser console file,

target.extend is not a function.

This error came due to invalid syntax in your mixins file. you need to fix the mixins JS file to resolve that error. Continue reading “How to fix TypeError: target.extend is not a function mixins in Magento 2?”

How to delete Elasticsearch indices in Magento 2?

You can delete specific elastic search indices or all the available indices with the help of the Delete command.

You can run the given command to delete a specific index from the elastic search,

curl -X DELETE 'http://localhost:9200/<index_name>'

Continue reading “How to delete Elasticsearch indices in Magento 2?”

How to get list of all Elasticsearch indices in Magento 2?

Magento 2 you can get a list of all indices available for the system, With the help of the CLI command, You can check the status of each indices used for the system.

You can run the given command,
curl -X GET http://localhost:9200/_cat/indices?v

If you have changed your elastic search hostname to something else, You need to replace localhost with your actual name.

For example, curl -X GET http://elasticsearch:9200/_cat/indices?v

You can get the result once the valid URL is available, On a success call, the result looks like this,

health status index                                                uuid                   pri rep docs.count docs.deleted store.size pri.store.size
green  open   magento_default_catalog_product_20230703_022952      bjHqWsUATpGg1xwnnB5YAg   1   0          0            0       283b           283b

With a list of available indices for the system in a response.
Health status green displays your indices status is healthy.