0

I've Cake PHP 3.4 application on PHP 5.6. When I try to bake a mode like this sudo bin/cake bake model my_table it gives below error.

Exception: Plugin WyriHaximus/TwigView could not be found. in [/home/yasith/PROJECTS/GINA/gigstr_backend/vendor/cakephp/cakephp/src/Core/Plugin.php, line 149]
2018-01-13 10:43:17 Error: [Cake\Core\Exception\MissingPluginException] Plugin WyriHaximus/TwigView could not be found. in /home/yasith/PROJECTS/GINA/gigstr_backend/vendor/cakephp/cakephp/src/Core/Plugin.php on line 149
Exception Attributes: array (
  'plugin' => 'WyriHaximus/TwigView',
)
Stack Trace:
#0 /home/yasith/PROJECTS/GINA/gigstr_backend/vendor/cakephp/bake/src/Shell/BakeShell.php(58): Cake\Core\Plugin::load('WyriHaximus/Twi...', Array)
#1 /home/yasith/PROJECTS/GINA/gigstr_backend/vendor/cakephp/cakephp/src/Console/Shell.php(497): Bake\Shell\BakeShell->startup()
#2 /home/yasith/PROJECTS/GINA/gigstr_backend/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php(230): Cake\Console\Shell->runCommand(Array, true, Array)
#3 /home/yasith/PROJECTS/GINA/gigstr_backend/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php(182): Cake\Console\ShellDispatcher->_dispatch(Array)
#4 /home/yasith/PROJECTS/GINA/gigstr_backend/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php(128): Cake\Console\ShellDispatcher->dispatch(Array)
#5 /home/yasith/PROJECTS/GINA/gigstr_backend/bin/cake.php(33): Cake\Console\ShellDispatcher::run(Array)
#6 {main}

The bake is working well in previously and that didn't give any error before. is that any version issue or how to fix that?

Miuranga
  • 2,463
  • 10
  • 51
  • 81
  • 1
    What version of bake are you using (look for `"name": "cakephp/bake"` in your `composer.lock` file)? Also check if the twig view plugin is installed (it should be in `vendor/wyrihaximus/twig-view`) and that its corresponding path in the `vendor/cakephp-plugins.php` file is correct. – ndm Jan 13 '18 at 14:49
  • @ndm version of bake : 1.6.0 Yes, That plugin in that path. – Miuranga Jan 13 '18 at 16:14
  • 1
    And what about the path to the plugin in the mentioned `cakephp-plugins.php` file? Is it there, and is it correct? If it is and it is correct, then it seems like the folder cannot be accessed for whatever reason (permissions maybe...). Also try to do some debugging, add a breakpoint in the `Plugin::load()` method and check whether it uses the correct path. – ndm Jan 14 '18 at 12:42

0 Answers0