1

Magento 2.1

We have a site setup with both English and French languages. We were noticing some french translations weren't showing on checkout page. Upon further inspection js-translation.json was missing.

Ran,

php bin/magento setup:static-content:deploy fr_FR -v

We get back the following error,

#0 /home/magento/public_html/lib/internal/Magento/Framework/App/View/Asset/Publisher.php(73): Magento\Framework\View\Asset\File->getSourceFile()
#1 /home/magento/public_html/lib/internal/Magento/Framework/App/View/Asset/Publisher.php(61): Magento\Framework\App\View\Asset\Publisher->publishAsset(Object(Magento\Framework\View\Asset\File))
#2 /home/magento/public_html/app/code/Magento/Deploy/Model/Deployer.php(445): Magento\Framework\App\View\Asset\Publisher->publish(Object(Magento\Framework\View\Asset\File))
#3 /home/magento/public_html/app/code/Magento/Deploy/Model/Deployer.php(302): Magento\Deploy\Model\Deployer->deployFile('js-translation....', 'frontend', 'Magento/luma', 'fr_FR', NULL)
#4 /home/magento/public_html/app/code/Magento/Deploy/Console/Command/DeployStaticContentCommand.php(447): Magento\Deploy\Model\Deployer->deploy(Object(Magento\Framework\App\ObjectManagerFactory), Array, Array)
#5 /home/magento/public_html/app/code/Magento/Deploy/Console/Command/DeployStaticContentCommand.php(468): Magento\Deploy\Console\Command\DeployStaticContentCommand->deploy(Object(Magento\Deploy\Model\Deployer), Array, Array)
#6 [internal function]: Magento\Deploy\Console\Command\DeployStaticContentCommand->Magento\Deploy\Console\Command\{closure}(Object(Magento\Deploy\Model\Process))
#7 /home/magento/public_html/app/code/Magento/Deploy/Model/Process.php(53): call_user_func(Object(Closure), Object(Magento\Deploy\Model\Process))
#8 /home/magento/public_html/app/code/Magento/Deploy/Model/ProcessManager.php(41): Magento\Deploy\Model\Process->run()
#9 /home/magento/public_html/app/code/Magento/Deploy/Console/Command/DeployStaticContentCommand.php(486): Magento\Deploy\Model\ProcessManager->fork(Object(Closure))
#10 /home/magento/public_html/app/code/Magento/Deploy/Console/Command/DeployStaticContentCommand.php(371): Magento\Deploy\Console\Command\DeployStaticContentCommand->runProcessesInParallel(Object(Magento\Deploy\Model\Deployer), Array, Array)
#11 /home/magento/public_html/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Magento\Deploy\Console\Command\DeployStaticContentCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /home/magento/public_html/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /home/magento/public_html/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(Magento\Deploy\Console\Command\DeployStaticContentCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /home/magento/public_html/lib/internal/Magento/Framework/Console/Cli.php(96): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /home/magento/public_html/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /home/magento/public_html/bin/magento(23): Symfony\Component\Console\Application->run()
#17 {main}

Successful: 2729 files; errors: 1

Looking for information on what this error is exactly and any possible fixes.

2

Use this command :

Please set Vendor= Your vendor name and Theme= Your theme name for frontend

php bin/magento setup:static-content:deploy --theme=Vendor/Theme en_US
php bin/magento setup:static-content:deploy --theme=Vendor/Theme fr_FR

I had problem in admin panel and I ran

php bin/magento setup:static-content:deploy --theme=Magento/backend en_US
php bin/magento setup:static-content:deploy --theme=Magento/backend fr_FR

This command created

js-translation.json

pub/static/adminhtml/Magento/backend/en_US/js-translation.json
pub/static/adminhtml/Magento/backend/fr_FR/js-translation.json

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.