У меня странная проблема ...
Я создаю новый проект Symfony:
composer create-project symfony/skeleton Vikings
Затем я установил на бис (bootstrap, jquery, poppers.js)
composer require encore
yarn install
yarn add bootstrap --dev
yarn add jquery popper.js --dev
Я устанавливаю app.js и app.scss для начальной загрузки и запускаю:
yarn encore dev
Получил 5 файлов:
public/build/app.css
public/build/app.js
public/build/entrypoints.json
public/build/manifest.json
public/build/runtime.js
public/build/vendors~app.js
, но теперь, когда я запускаю
php bin/console cache:clear
получил эту ошибку:
// Clearing the cache for the dev environment with debug true
// Clearing outdated warmup directory...
// Warming up cache...
In EntrypointLookup.php line 86:
[Symfony\WebpackEncoreBundle\Exception\EntrypointNotFoundException]
Could not find the entry "dummy" in "/Users/lukahome/Projects/Vikings/public/build/entrypoints.json". Found: entrypoints.
Exception trace:
() at /Users/lukahome/Projects/Vikings/vendor/symfony/webpack-encore-bundle/src/Asset/EntrypointLookup.php:86
Symfony\WebpackEncoreBundle\Asset\EntrypointLookup->validateEntryName() at /Users/lukahome/Projects/Vikings/vendor/symfony/webpack-encore-bundle/src/Asset/EntrypointLookup.php:59
Symfony\WebpackEncoreBundle\Asset\EntrypointLookup->getEntryFiles() at /Users/lukahome/Projects/Vikings/vendor/symfony/webpack-encore-bundle/src/Asset/EntrypointLookup.php:41
Symfony\WebpackEncoreBundle\Asset\EntrypointLookup->getJavaScriptFiles() at /Users/lukahome/Projects/Vikings/vendor/symfony/webpack-encore-bundle/src/CacheWarmer/EntrypointCacheWarmer.php:41
Symfony\WebpackEncoreBundle\CacheWarmer\EntrypointCacheWarmer->doWarmUp() at /Users/lukahome/Projects/Vikings/vendor/symfony/framework-bundle/CacheWarmer/AbstractPhpFileCacheWarmer.php:51
Symfony\Bundle\FrameworkBundle\CacheWarmer\AbstractPhpFileCacheWarmer->warmUp() at /Users/lukahome/Projects/Vikings/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php:96
Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate->warmUp() at /Users/lukahome/Projects/Vikings/vendor/symfony/framework-bundle/Command/CacheClearCommand.php:194
Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand->warmup() at /Users/lukahome/Projects/Vikings/vendor/symfony/framework-bundle/Command/CacheClearCommand.php:129
Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand->execute() at /Users/lukahome/Projects/Vikings/vendor/symfony/console/Command/Command.php:255
Symfony\Component\Console\Command\Command->run() at /Users/lukahome/Projects/Vikings/vendor/symfony/console/Application.php:919
Symfony\Component\Console\Application->doRunCommand() at /Users/lukahome/Projects/Vikings/vendor/symfony/framework-bundle/Console/Application.php:89
Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /Users/lukahome/Projects/Vikings/vendor/symfony/console/Application.php:262
Symfony\Component\Console\Application->doRun() at /Users/lukahome/Projects/Vikings/vendor/symfony/framework-bundle/Console/Application.php:75
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /Users/lukahome/Projects/Vikings/vendor/symfony/console/Application.php:145
Symfony\Component\Console\Application->run() at /Users/lukahome/Projects/Vikings/bin/console:38
Я немного отладил и обнаружил, что 'пустышка' жестко запрограммирована в EntrypointCacheWarmer.php
protected function doWarmUp($cacheDir, ArrayAdapter $arrayAdapter)
{
foreach ($this->cacheKeys as $cacheKey => $path) {
// If the file does not exist then just skip past this entry point.
if (!file_exists($path)) {
continue;
}
$entryPointLookup = new EntrypointLookup($path, $arrayAdapter, $cacheKey);
try {
$entryPointLookup->getJavaScriptFiles('dummy');
} catch (EntrypointNotFoundException $e) {
// ignore exception
}
}
}
Если я изменил "пустышку" на"приложение" нет ошибки, но я не знаю, если это правильное решение ...
ПОЖАЛУЙСТА, ПОМОГИТЕ