Answer the question
In order to leave comments, you need to log in
Problems with yii2-simplechat working with yii2-twig. Gives an error The file or directory to be published does not exist: ...twig.js How to fix?
I have the following problem. I installed yii2-simplechat via composer on yii2 basic following instructions: https://github.com/bubasuma/yii2-simplechat . Added "bubasuma/yii2-simplechat": "*" to composer.json and ran composer update. Everything went well. But this simplechat didn't work through yii2-twig. I also installed it via composer using the following instructions: https://github.com/yiisoft/yii2-twig . Everything fit and settled well. But when I go to the premium-my-freestyle.esy.es/messages page to see how the chat worked, the following message is shown: An exception has been thrown during the rendering of a template ("The file or directory to be published does not exist: / home/u172121359/vendor/bower/twig.js") . Here is a picture of the error:
Answer the question
In order to leave comments, you need to log in
I solved this issue. Here is a set of activities that I did: 1) Installed the asset manager fxp/composer-asset-plugin (in the require section of composer.json I wrote: "fxp/composer-asset-plugin": "v1.4.1"). Or composer global require "fxp/composer-asset-plugin:~1.4.1" . Without it, nothing will work, twig.js will not install. Also installed other packages:
"yiisoft/yii2-twig": "dev-master",
"yiisoft/yii2-faker": "*",
"bower-asset/twig.js": "[email protected]",
" bubasuma/yii2-simplechat": "*"
This is all in the require section. Then I wrote aliases in the config file (I have config/web.php):
'aliases' => [
'@bower' => '
And everything worked.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question