In the Store Pickup with Locator extension, there's an optional Amasty_StorePickupWithLocatorMSI module which is related to the default Magento inventory functionality. The "Undefined index: inventory_source" error during running the 'setup:upgrade' command may appear when the Magento_Inventory modules are disabled:
You may check the statuses of all the modules on your instance by running the following command:
php bin/magento module:status
To enable/disable a module, use the corresponding command:
php bin/magento module:enable ModuleName
php bin/magento module:disable ModuleName
Alternatively, in case you don't need the functionality of the Amasty_StorePickupWithLocatorMSI module, you may disable it and remove the amasty_amlocator_location_inventory_source table from the Database.
The Database table can be removed either by running the 'DROP TABLE table_name' SQL query or manually: