How to fix the «Undefined offset: 1 in vendor/magento/framework/App/Utility/Files.php on line 748» failure on a `js-translation.json` HTTP request?

How to fix

Step 1

File: app/code/ShippingField/ShippingAddress/etc/module.xml

Replace the line:

<module name="ShippingField" setup_version="2.0.0" />

with the following one:

<module name="ShippingField" setup_version="2.0.0" />

Step 2

File: app/code/ShippingField/ShippingAddress/registration.php
Replace the block:

\Magento\Framework\Component\ComponentRegistrar::register(
  \Magento\Framework\Component\ComponentRegistrar::MODULE,
  'ShippingField',
  __DIR__
);

with the following one:

\Magento\Framework\Component\ComponentRegistrar::register(
	\Magento\Framework\Component\ComponentRegistrar::MODULE,
	'ShippingField_ShippingAddress',
	__DIR__
);

Step 3

Update the modules:

bin/magento setup:upgrade
rm -rf var/di var/generation generated/code && bin/magento setup:di:compile